R
RS200Phil
Hi,
I am here in the UK, using VBA to import an XLS file into Access.
If I open the XLS file in Excel I can change the date formats to my
heart's content and it all works beautifully. If I change the data
format to "General", for example, I get...
38544...for 11th July, and
38545...for 12th July
However, when my Access application opens the same file and uses VBA to
change the format of the cells, I get...
38663...for 11th July (i.e. 7th November), and
38693...for 12th July (i.e. 7th December)
All the program does (at the moment) is open the file, format the
relevant column and save and close the file.
I cannot find any way of reading this date value correctly. It is
stored internally as a number, I appreciate, but even the number seems
to change if I open the file using VBA.
Any suggestions would be most welcome.
TIA
Phil
I am here in the UK, using VBA to import an XLS file into Access.
If I open the XLS file in Excel I can change the date formats to my
heart's content and it all works beautifully. If I change the data
format to "General", for example, I get...
38544...for 11th July, and
38545...for 12th July
However, when my Access application opens the same file and uses VBA to
change the format of the cells, I get...
38663...for 11th July (i.e. 7th November), and
38693...for 12th July (i.e. 7th December)
All the program does (at the moment) is open the file, format the
relevant column and save and close the file.
I cannot find any way of reading this date value correctly. It is
stored internally as a number, I appreciate, but even the number seems
to change if I open the file using VBA.
Any suggestions would be most welcome.
TIA
Phil