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]

/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 

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

Combo Box format 0
combo box 2
Combo Box question 5
MsgBox Displays Twice 5
Excel is changing date format incorrectly 7
VBA Combo Box 2
Find Date cell using Calendar Control 1
date corruption? 00/01/1900 1

Back
Top