I have a excel workbook that i want to save as a csv file. This is the code i use:
Application.DisplayAlerts = True
ActiveWorkbook.SaveAs FileName:= _
"C:\Users\Geoffrey\Dropbox\DCS PROGRAM\FILES\1. QUOTES\3. PROGRAM FILES\DOOR QT REQUESTS\DOORS_COMBINED.csv", FileFormat:=xlCSV _
, CreateBackup:=False
Workbooks.Open ("C:\Users\Geoffrey\Dropbox\DCS PROGRAM\FILES\1. QUOTES\3. PROGRAM FILES\DOOR QT REQUESTS\DOOR PROGRAM.xlsm")
Workbooks("DOORS_COMBINED.csv").Close
The problem is when i save it it does not look the same as the excel workbook.
Excel file:
A B C D
Item 1 Item 2 Item3 Item 4
Item 1 Item 2 Item3 Item 4
Item 1 Item 2 Item3 Item 4
.CSV File: (Everything gets combined into column A)
A B C D
Item 1Item 2Item3Item 4
Item 1Item 2Item3Item 4
Item 1Item 2Item3Item 4
If i save this manually as a .csv it turns out correct.
I think this could be the problem. I set excel to read the delimeter as ; because my descriptions contain commas.
Notepad view when using VBA to SaveAs:
Notepad view when SaveAs manually:


ActiveWorkbookas csv, then continue on with additional programming. Lines after are done in a csv file. When you exit, macros are lost. You might have conflict. Try saving to csv and exiting right after. Also might consider savingActiveSheet.DOORS_COMBINED.csvand then openingDOOR PROGRAM.xlsm. So when you're opening the file you're unhappy with, are you opening it manually? Does it prompt you to specify how the file is delimited by chance?