Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try: Sheets("Corrective Actions").Cells(6, 5).Value = CDate(UserForm1.Label4) -- Regards Frank Kabel Frankfurt, Germany "nbs" schrieb im Newsbeitrag ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks!!! That did it!!!
-----Original Message----- Hi try: Sheets("Corrective Actions").Cells(6, 5).Value = CDate(UserForm1.Label4) -- Regards Frank Kabel Frankfurt, Germany "nbs" schrieb im Newsbeitrag ... 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 . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
? 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
conditional formatting for cell date to equal today's date | Excel Worksheet Functions | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Zip Code Formatting | New Users to Excel | |||
Convert a julian gregorian date code into a regular date | Excel Worksheet Functions | |||
code pasting a date changes date format in current month only | Excel Programming |