Combobox and data values

  • Thread starter Thread starter fragher75
  • Start date Start date
F

fragher75

Excuse me, I retry to post this thread....

I have a problem with the format of the values in a combobox.
The range of values in the "ListFillRange" are dates (Jan-02
Feb-02...).
When I select a value in the combobox, this value changes in a serial
data format (37287,37315 ....)

Arno suggests:

Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Value, "dd.mm.yyyy")
End Sub

But in this way, after the selection, in the linked cell, I see onl
this year dates!!!
My dates start from 2002!!!

Help me, please.. And excuse me for reply of this thread.
Bye, Francesco
 
Jan-02 is interpreted by excel as Jan 2, 2004

If you insist on displaying a format like Jan-02 in the combobox, then you
won't be able to correct this problem. Why not display it as Jan-2002

Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Value, "mmm-yyyy")
End Sub


or if you are willing to display the day

Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Value, "d-mmm-yyyy")
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top