Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Storing time formats in strings
Cell "A1" is formatted to accept time data in the format of:
[h]:mm If I run the following code: Dim s as String s = Range("A1").Value MsgBox s The message box will display a long floating point number instead of the time that is displayed in the cell. Is there a way to store the time that is displayed in a cell into a string variable?? thnak you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Storing time formats in strings
Use the Text property instead of the Value property...
s = Range("A1").Text -- Rick (MVP - Excel) "Robert Crandal" wrote in message ... Cell "A1" is formatted to accept time data in the format of: [h]:mm If I run the following code: Dim s as String s = Range("A1").Value MsgBox s The message box will display a long floating point number instead of the time that is displayed in the cell. Is there a way to store the time that is displayed in a cell into a string variable?? thnak you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Storing date and time | Excel Programming | |||
Storing Formats of cells in Array and reapply later | Excel Programming | |||
Storing real time data into Sql Server | Excel Programming | |||
Converting time formats into actual time(minutes) | Excel Discussion (Misc queries) | |||
storing real time data | Excel Discussion (Misc queries) |