ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Coping dates (https://www.excelbanter.com/excel-programming/322533-coping-dates.html)

Mark Scholes

Coping dates
 
Hi,
I use this to copy some data from one workbook to another

Cells(2, 3).Resize(12, NoMonths).Value = Workbooks
(File).Worksheets(SourceSheet).Cells(110,
StartColumn).Resize(12, NoMonths).Value

when I run it on some machines the dates change from
Australian to US. The conversion is in the daynumber, it
changes.
How do I stop it from changeing the date

Thanks MarkS


Dave Peterson[_5_]

Coping dates
 
It sounds like the dates aren't changing. But the numberformat is.

If that's true, try changing the .numberformat to what you like.

If it's not true, try using .value2 instead of .value (in both spots)--untested.

Mark Scholes wrote:

Hi,
I use this to copy some data from one workbook to another

Cells(2, 3).Resize(12, NoMonths).Value = Workbooks
(File).Worksheets(SourceSheet).Cells(110,
StartColumn).Resize(12, NoMonths).Value

when I run it on some machines the dates change from
Australian to US. The conversion is in the daynumber, it
changes.
How do I stop it from changeing the date

Thanks MarkS


--

Dave Peterson


All times are GMT +1. The time now is 02:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com