View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Blobbies Blobbies is offline
external usenet poster
 
Posts: 18
Default Format Date ComboBox

Thanks Adam - That seems to work a treat, although upsets things further on
in the code when it's simply searching for the date in General format, and
it's been converted to dd/mm/yy!! Nevermind .... I'll work my way around
that!!


Cheers!!



Edi

" wrote:

On Jan 9, 8:49 pm, Blobbies
wrote:
I have a userform that has two date comboboxes.

The second combobox dates (days of the applicable working week) are reliant
on the whatever date (paydate) is selected.

The listed dates within each combo box are in the format [dd-mm-yy], but
once they are selected on the userform, they revert to a serial number date.

Is the anyway of retaining the [dd-mm-yy] format when the date is selected
on the userform?

Many thanks in advance for your help!!!

Edi, NZ


I had the same issue. You have to format the combo box using VBA.
There is probably a better way, but this one works.

Private Sub ComboBox1_Change()
MyDate = Format(ComboBox1.Value, "mm/d/yyyy")
ComboBox1.Value = Format(MyDate, "mm/d/yyyy")
End Sub