View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default Get a Date to show as a Date Format in Combo Box

Your declaring then testing against GetDate. This will fail as the value
will be 00:00:00



--

Regards,
Nigel




"Jez" wrote in message
...
I have a combo Box which can select a date but it just displays as the
Number
format, I have this code below to change the format but doesnt seem to do
anything when I select a Date it still shows as a number format.
Where have I gone wrong?

Private Sub cboGetDate_Change()
Dim GetDate As Date
If GetDate = CDate(cboGetDate.Value) Then
cboGetDate.Value = Format(CDate(cboGetDate.Value), "dd/mm/yyyy")
Else
End If
End Sub