change format of dropdown list in combo box
- From: itsyash@xxxxxxxxx
- Date: Thu, 14 Jun 2007 22:02:18 -0700
For a combo box, I am building a list of dates for the last 365 days
using a loop. This date is in "mm/dd/yyyy" format by default. I want
to display this list in "dd/mmm/yyyy" format when the user clicks on
the drop down.
For this i'm using the code:
Private Sub cmbDateOfTimeLimit_Change()
cmbDateOfTimeLimit.Value = Format(cmbDateOfTimeLimit.Value, "dd/
mmm/yyyy")
End Sub
This is because if I use
cmbDateOfTimeLimit.Value = Format(cmbDateOfTimeLimit.Value, "dd/
mmm/yyyy")
in the userform_initialize() event it does not change anything....
However when i use the code in combobox_change() it displays the date
in "dd/mmm/yyyy" format only after the date is selected. In the drop
down it still shows in the old format.
Can someone plz help me 2 get rid if this issue..
Thanks in advance,
Yash
.
- Follow-Ups:
- Re: change format of dropdown list in combo box
- From: Corey
- Re: change format of dropdown list in combo box
- Prev by Date: Re: Hiding/Restoring Built-In CommandBars?
- Next by Date: Re: change format of dropdown list in combo box
- Previous by thread: Gaining the correct Listbox Column value
- Next by thread: Re: change format of dropdown list in combo box
- Index(es):
Relevant Pages
|