ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening CSV file causes date differences (https://www.excelbanter.com/excel-programming/273636-re-opening-csv-file-causes-date-differences.html)

Tom Ogilvy

Opening CSV file causes date differences
 
You can try naming the file with a txt extension. Then code opentext to
treat that column as text. You can convert it to a date once it is in
Excel, using your code. Reform the column, then do a replace of - with - in
the edit menu. This should cause the text string to be evaluated as a date.

Regards,
Tom Ogilvy


Mark wrote in message
...
Currently when I open a CSV file with date "05/08" it
comes up as "5-AUG" when I open the file from Excel. If I
open the file from VBA code using workbooks.open into
excel the date comes up as "8-MAY" any ideas of how to
open the file in VBA code and return the correct format
of "5-AUG"

Thanks in advance





All times are GMT +1. The time now is 07:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com