Excel Combo Box - Data format

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I have a Combo Box that has a linked cell reference to a
cell that contains a date value. The Date Value is "=NOW
()" by the way.

The combo box is displaying the numeric date value - how
can I format this to read as a date?

I also wanted to then use an up down control (or even
better one of those controls that lets you pick a date
off of a calendar).

So how do I make it display a date and how do I let the
user modify this existing date?

Thanks
 
Hi Dan,

You can use Format function and Change event.
Place this code in worksheet module(or Userform modele??, I'm not sure where
the combobox is.)

Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Value, "d/m/yyyy") 'Change here as
you like!
End Sub


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/colo/CellMastersLink.htm
mailto:[email protected]

/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 
Back
Top