excel vba activateworkbook.save changes date format
I'm running a macro that creates a blank workbook using Workbook.Add and saves it in a specified location as a CSV (FileFormat:=xlCSV). It then copies data from another workbook into this sheet with formatting (Paste:=xlPasteValuesAndNumberFormats). Then I run "ActiveWorkbook.Close SaveChanges:=True".
When I open the CSV file, using Notepad to see the true format, the date formats are incorrect.
The strange thing is that, if I comment out "ActiveWorkbook.Close SaveChanges:=True" and manually close and save the file, using my mouse. the formatting is correct.
If I run "ActiveWorkbook.Save" and manually close the file, the format is also incorrect.
I can only deduce that it is vba ".save" that is changing the date formats.
I have checked my machine's regional settings and these are correct...
Does anyone know of a way to deal/fix this?
TIA!