Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi guys
I have a sheet which opens up 5 other sheets in turn to obtain data. 4 of the sheets have info in columns next to a date column (eg) 07/11/2007 : xxx : xxx 07/11/2007 : xxx : xxx But when my VB opens the sheets the dates change from 07/11/2007 (UK) to 11/07/2007 (US). I am using nothing other than "Workbooks.Open Filename:=FPATH & BO_TEMP" to open the file. (FPATH and BO_TEMP are variables defined earlier in the code). Any ideas on why this is? Thanks! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dan,
I think that what you're encountering is a regional setting on your computer (or maybe in Excel). Excel stores a date as a "date". The format that the date shows up in is dependent on the default on your system. Chris -- Chris Farkas Excel/Access Developer http://www.eAlchemy.biz "Dan V" wrote: Hi guys I have a sheet which opens up 5 other sheets in turn to obtain data. 4 of the sheets have info in columns next to a date column (eg) 07/11/2007 : xxx : xxx 07/11/2007 : xxx : xxx But when my VB opens the sheets the dates change from 07/11/2007 (UK) to 11/07/2007 (US). I am using nothing other than "Workbooks.Open Filename:=FPATH & BO_TEMP" to open the file. (FPATH and BO_TEMP are variables defined earlier in the code). Any ideas on why this is? Thanks! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's what I thought, however, opening the sheet on it's own and the dates
are in UK format - open the same sheet using VB in the master sheet and the dates are in US format... ????? "eAlchemist" wrote: Dan, I think that what you're encountering is a regional setting on your computer (or maybe in Excel). Excel stores a date as a "date". The format that the date shows up in is dependent on the default on your system. Chris -- Chris Farkas Excel/Access Developer http://www.eAlchemy.biz "Dan V" wrote: Hi guys I have a sheet which opens up 5 other sheets in turn to obtain data. 4 of the sheets have info in columns next to a date column (eg) 07/11/2007 : xxx : xxx 07/11/2007 : xxx : xxx But when my VB opens the sheets the dates change from 07/11/2007 (UK) to 11/07/2007 (US). I am using nothing other than "Workbooks.Open Filename:=FPATH & BO_TEMP" to open the file. (FPATH and BO_TEMP are variables defined earlier in the code). Any ideas on why this is? Thanks! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this out. It might be a way around your issue.
Reference the date in a corresponding column. Format the new column to the "US" date format. Hie it if necessary. Use that column when referencing data in your macro. Does it revert back to the UK date? "Dan V" wrote: That's what I thought, however, opening the sheet on it's own and the dates are in UK format - open the same sheet using VB in the master sheet and the dates are in US format... ????? "eAlchemist" wrote: Dan, I think that what you're encountering is a regional setting on your computer (or maybe in Excel). Excel stores a date as a "date". The format that the date shows up in is dependent on the default on your system. Chris -- Chris Farkas Excel/Access Developer http://www.eAlchemy.biz "Dan V" wrote: Hi guys I have a sheet which opens up 5 other sheets in turn to obtain data. 4 of the sheets have info in columns next to a date column (eg) 07/11/2007 : xxx : xxx 07/11/2007 : xxx : xxx But when my VB opens the sheets the dates change from 07/11/2007 (UK) to 11/07/2007 (US). I am using nothing other than "Workbooks.Open Filename:=FPATH & BO_TEMP" to open the file. (FPATH and BO_TEMP are variables defined earlier in the code). Any ideas on why this is? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
permanent conversion of 1904 date format to 1900 date format | Excel Worksheet Functions | |||
How do I convert dd/mm/yy date format to yyddd Julian date format | Excel Worksheet Functions | |||
convert serial date format to normal date format | Excel Discussion (Misc queries) | |||
code to convert date from TEXT format (03-02) to DATE format (200203) | Excel Programming | |||
Change a date in text format xx.xx.20xx to a recognised date format | Excel Programming |