date order changes when opening csv file via macro
Posted on 2006-05-25
I have a file that is used everyday. I wrote a macro that deletes the contents of a worksheet and then opens a csv file, copies the data into the worksheet and then closes the csv file.
I work with dates in the dd/mm/yyyy format (Ireland). When the csv file is opened the days 01 to 09 reverse with the month
example 2nd May 2006 02/05/2006 becomes 05/02/2006. - dates 10 - 31 are fine example - 24th May 2006 stays 24/05/2006
If I open the csv file directly with excel the dates are fine. It seems that using the macro upsets it!!! I need to import the csv file via a macro etc.
Anyone got any ideas??