Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell format
I've set a column of cells to be formatted as mm/dd/yyyy,
however when i move the date value of one of these cells to a string variable, the value in the variable is displayed as my regional option for the short date which is mmddyy. Is there a way around this. Can you set the regional system options with VBA and then reset when the spreadsheet application is closed? Thanks, Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell format
Dim sStr as String
sStr = Range("A1").Text Demoing from the immediate window: range("A1").Value = Date range("A1").NumberFormat = "mmmm dd, yyyy" ? range("A1").Value 1/3/04 ? range("A1").Text January 03, 2004 sStr = range("A1").Text ? sStr January 03, 2004 -- Regards, Tom Ogilvy Mike wrote in message ... I've set a column of cells to be formatted as mm/dd/yyyy, however when i move the date value of one of these cells to a string variable, the value in the variable is displayed as my regional option for the short date which is mmddyy. Is there a way around this. Can you set the regional system options with VBA and then reset when the spreadsheet application is closed? Thanks, Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lock Cell Format - Allow copy and paste of data without format change | Excel Worksheet Functions | |||
cell format - remove cell format pattern without effecting colors | Excel Discussion (Misc queries) | |||
Can cell format come from and change with reference cell format | Excel Discussion (Misc queries) | |||
how do i format a cell based on format of a range of cells? | Excel Discussion (Misc queries) | |||
How do I copy data in single cell format to a merged cell format | Excel Discussion (Misc queries) |