View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
brawlsadford brawlsadford is offline
external usenet poster
 
Posts: 6
Default date format changes when I save to CSV via a macro, but not manual

I'm using a macro to extract rows of data from a large, master CSV file -
breaking it down into chunks and re-saving it as smaller CSV files.

One of the columns in the master CSV file contains date and time data in the
format "dd/mm/yyyy hh:mm"

The macro pastes this data into the workbook fine, but when the macro saves
the sheet:
ActiveWorkbook.SaveAs Filename:=ActiveSheet.Name & ".csv",
FileFormat:=xlCSV, CreateBackup:=False

.... all the dates have been transposed into mm/dd/yyyy!

This doesn't happen when I save the sheet manually (Office button/Save As...
CSV)

My region settings are all set to U.K. - what's going on?

Thanks, in advance, for your help,

Saul