Help with Date Format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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
 
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... ?????
 
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Extract Data 2
How to calculate the Date occurs 2
Find then highlight in yellow 6
Open_Files_In_A_Directory 2
Update Directory Path in Code 4
VBA - ThisWorkbook 4
Loop Repeats - PLS HELP 2
Date Format Thingymabob 6

Back
Top