Reputation: 117
I've got this working, except I need the resulting files to be specifically a 'windows comma separated CSV' file. Any ideas how to specify this?
Sub asdf()
Dim ws As Worksheet, newWb As Workbook
Application.ScreenUpdating = False
For Each ws In Sheets(Array("sheet1", "sheet2"))
ws.Copy
Set newWb = ActiveWorkbook
With newWb
.SaveAs ws.Name & ".csv", xlCSV
.Close (False)
End With
Next ws
Application.ScreenUpdating = True
End Sub
Upvotes: 2
Views: 740
Reputation: 2985
It should be as easy as specifying the FileFormat
as CSVWindows
.SaveAs ws.Name & ".csv", xlCSVWindows
Upvotes: 3