Get a date to display in date format on a UserForm
Have you tried the CDate function? Or IsDate?
If IsDate CDate(ComboBox1.Value) Then
ComboBox1.Value = CDate(ComboBox1.Value)
Else
MsgBox "Not a valid date format!"
ComboBox1.SetFocus
End If
(This is air code so step through first.)
HTH,
JP
On Mar 21, 11:08*am, ryguy7272
wrote:
How can I get a date to display in date format on a UserForm? *I thought it
would be something simple, such as the following:
* * * * If ComboBox1.Text < "" Then
* * * * ComboBox1.Value = Format(ComboBox1.Value, "mm/dd/yyyy")
* * * * End If
However, I just see 39539 in the ComboBox when I really want to see 4/1/2008.
Thanks in advance.
Ryan--
--
RyGuy
|