Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Wrong dates in VBA
I have columns with of dates. eg 1/07/2009 meaning 1 July 2009. When I copy
this date using VBA and paste it to another range, it changes to 7/01/2009 and produces incorrect reports ie as 7 January 2009. It is obviously a US date thing but I don't know how to fix it. Please help... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Wrong dates in VBA
hi
i cannot duplicate your problem. i pre formated a cell to Norwegian(Bokmal) and ran the following code....... Range("B7").Copy Destination:=Range("B8") and vb copied the date and format to the new cell meaning the date format didnot change. post the code you are using. Regards FSt1 "Oz Viking" wrote: I have columns with of dates. eg 1/07/2009 meaning 1 July 2009. When I copy this date using VBA and paste it to another range, it changes to 7/01/2009 and produces incorrect reports ie as 7 January 2009. It is obviously a US date thing but I don't know how to fix it. Please help... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Wrong dates in VBA
On Tue, 15 Sep 2009 19:25:01 -0700, Oz Viking
wrote: I have columns with of dates. eg 1/07/2009 meaning 1 July 2009. When I copy this date using VBA and paste it to another range, it changes to 7/01/2009 and produces incorrect reports ie as 7 January 2009. It is obviously a US date thing but I don't know how to fix it. Please help... You will need to post the code you are using, along with your Windows Regional settings (from Control Panel). Also, are the "dates" true Excel dates? or Text strings? --ron |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Wrong dates in VBA
Are you copy|pasting or assigning values?
If you're assigning values: worksheets("Sheet999").range("A1").value2 _ = worksheets("sheet888").range("b2").value2 Oz Viking wrote: I have columns with of dates. eg 1/07/2009 meaning 1 July 2009. When I copy this date using VBA and paste it to another range, it changes to 7/01/2009 and produces incorrect reports ie as 7 January 2009. It is obviously a US date thing but I don't know how to fix it. Please help... -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding columns using dates, but getting wrong data | Excel Worksheet Functions | |||
Dates Being displayed the wrong way around. | Excel Programming | |||
Dates appear wrong in my chart | Charts and Charting in Excel | |||
dates automatically formatted wrong | Excel Discussion (Misc queries) | |||
I get wrong dates when i paste from a different sheet into a new s | Excel Discussion (Misc queries) |