Date Formatting in Code
? cdate("12/30/04 11:55:00")
12/30/2004 11:55:00 AM
so
If isdate(Userform1.Label4) Then
Sheets("Corrective Actions").Cells(6, 5).Value = _
cDate(UserForm1.Label4)
Else
Sheets("Corrective Actions").Cells(6, 5).Clearcontents
End if
--
Regards,
Tom Ogilvy
"nbs" wrote in message
...
This continues from the string vs. date formatting help
provided earlier and which was helpful in determining the
fact that one is a string and one is not. Here this is the
souce of the string:
Sheets("Corrective Actions").Cells(6, 5).Value =
UserForm1.Label4
If Label4 is "12/30/04 11:55:00" how to I ensure it is
written in Cells(6, 5) as date formatted and not string
formatted.
Thanks
|