Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unwanted date conversion when opening a workbook
I have a document, saved as text from another application (business objects) which contains the value 01/06/2004 (1st June 2004) in cell A5
When I open the workbook mannually I see the correct date, but when I open it with code (workbooks.open("path.xls")) it comes up with 01/06/200 Any help Thank Rob |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unwanted date conversion when opening a workbook
What version of Excel.
How do you open it in code? Generally, VBA treats a date as US format if it can. Excel 2002 had some additional options/settings to handle this as I recall. -- Regards, Tom Ogilvy "Rob" wrote in message ... I have a document, saved as text from another application (business objects) which contains the value 01/06/2004 (1st June 2004) in cell A5. When I open the workbook mannually I see the correct date, but when I open it with code (workbooks.open("path.xls")) it comes up with 01/06/2004 Any help? Thanks Rob |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unwanted date conversion when opening a workbook
if it's a text file you could/should open it: set wb=workbooks.opentext("path.txt") see opentext method in vba help for all the params you can set. some of the array settings may seem complicated, _ but just give it a few tries with the macrorecorder running ... keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool ?B?Um9i?= wrote: I have a document, saved as text from another application (business objects) which contains the value 01/06/2004 (1st June 2004) in cell A5. When I open the workbook mannually I see the correct date, but when I open it with code (workbooks.open("path.xls")) it comes up with 01/06/2004 Any help? Thanks Rob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 General Formating Unwanted Text to Date Conversion | Excel Discussion (Misc queries) | |||
Opening at Unwanted | Excel Discussion (Misc queries) | |||
Unwanted data conversion in cells | Excel Discussion (Misc queries) | |||
unwanted csv date conversion | Excel Discussion (Misc queries) | |||
unwanted number to date conversion while pasting data from web | Excel Worksheet Functions |