ComboBox - Excel

S

sarah

Hi,

i have a problem when i choose a date in the combobox; for example, my
list contains some dates (08/05/2003 etc) and when i choose a
date,this is the number 37839 that appears.
How can I do to make visible the date and not the number?
Thanks,

Sarah
 
N

Nick Hodge

Sarah

Format it. The number is simply how Excel stores dates (days are whole
numbers since 1/1/1900, times are decimals of a day)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
[email protected]
 
T

Tom Ogilvy

Private Sub Combobox1_Click()
Combobox1.Value = Format(clng(Combobox1.Value),"mm/dd/yyyy")
End Sub
 
N

Nick Hodge

Sarah

Sorry fogot I was in the programming group. My reason still holds, but see
Tom's answer in code

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
[email protected]
 
Top