Wrong dates in VBA

  • Thread starter Thread starter Oz Viking
  • Start date Start date
O

Oz Viking

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...
 
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
 
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
 
Are you copy|pasting or assigning values?

If you're assigning values:

worksheets("Sheet999").range("A1").value2 _
= worksheets("sheet888").range("b2").value2
 
Back
Top