Rick Howard
New Member
- Joined
- Dec 14, 2007
- Messages
- 43
I have a small 5-column, 100-row set of data in a single worksheet.
When I manually "Save As" into to a CSV file, the CSV file will open into a 5-column worksheet.
When I tried to export the data into a CSV file, the CSV file opens with each row as a single string of text (although it does have symbols to indicate where the column breaks should be).
Can my VBA code be changed to fix this?
Thanks.... RICK
When I manually "Save As" into to a CSV file, the CSV file will open into a 5-column worksheet.
When I tried to export the data into a CSV file, the CSV file opens with each row as a single string of text (although it does have symbols to indicate where the column breaks should be).
Can my VBA code be changed to fix this?
'To save only the active worksheet as CSV file. File name in cell "A1".
ActiveSheet.Copy
ActiveWorkbook.SaveAs Filename:="C:\Temp\" & Worksheets("CT_Data").Range("A1") & ".csv", _
FileFormat:=xlText
'Remove row 1 with file name, save, close.
Application.Goto Reference:="R1C1"
Selection.EntireRow.Delete
ActiveWorkbook.Save
ActiveWorkbook.Close SaveChanges:=False
Thanks.... RICK