Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening CSV File
I have a problem when opening a CSV file which has a column of dates. The
CSV file has the dates listed as "1/10/2008". If I open the file directly in Excel, when the file opens the column displays the dates in UK format as they should be. However if I use the VBA line below: Set RecFileFile = Workbooks.Open(fRecFile) When the file opens the dates as displayed as "10/1/2008" - the US format. Obviously I need the file to open and read the dates as they are in the CSV file, i.e. stop the conversion - how do i do this? PWS |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening CSV File
Hi Paul
Set RecFileFile = Workbooks.Open(FileName:=fRecFile, Local:=True) This will force Excel VBA to use your regional settings. HTH Cordially Pascal "Paul W Smith" a écrit dans le message de news: ... I have a problem when opening a CSV file which has a column of dates. The CSV file has the dates listed as "1/10/2008". If I open the file directly in Excel, when the file opens the column displays the dates in UK format as they should be. However if I use the VBA line below: Set RecFileFile = Workbooks.Open(fRecFile) When the file opens the dates as displayed as "10/1/2008" - the US format. Obviously I need the file to open and read the dates as they are in the CSV file, i.e. stop the conversion - how do i do this? PWS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro for Opening Reuters, Opening Excel File, Closing Excel File | Excel Programming | |||
File:1 and File:2 -- Double Files when Opening One File | Excel Discussion (Misc queries) | |||
opening an excel file opens a duplicate file of the same file | Excel Discussion (Misc queries) | |||
Error:Invalid File format,while opening an Excel Template file | Excel Programming |