Consulting

Results 1 to 2 of 2

Thread: Fixed formatting of combobox?

  1. #1
    VBAX Regular
    Joined
    Nov 2012
    Posts
    57
    Location

    Fixed formatting of combobox?

    Hello,

    I have a combo box on one sheet that has selections of "MMM-YY". On the sheet, I have a private subroutine on that sheet that looks like:

    Private Sub MonthDropDown_Change()
     MonthDropDown.Value = Format(MonthDropDown.Value, "mmm-yy")
    End Sub
    This successfully shows the selection in MMM-YY date format (i.e. Jan-15) instead of "42005" for instance.

    When I move around the workbook and change sheets a few times, it reverts away from data format and becomes "42005" until i come back and reselect the date from the drop down menu.
    Any ideas on how to fix this?

    Thanks.

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Format the cell the dropdown is in?
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •