Skip to content

Instantly share code, notes, and snippets.

@mamu7211
Created August 1, 2017 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamu7211/7138a7df26e2a14e77417cde75f30618 to your computer and use it in GitHub Desktop.
Save mamu7211/7138a7df26e2a14e77417cde75f30618 to your computer and use it in GitHub Desktop.
Save All XLS Worksheets as CSV
Sub SaveAll()
Dim count As Integer
Dim i As Integer
count = ActiveWorkbook.Worksheets.count
For i = 1 To count
SaveAsCsv (ActiveWorkbook.Worksheets(i).Name)
Next i
End Sub
Sub SaveAsCsv(sheetname As String)
Sheets(sheetname).Select
ActiveWorkbook.SaveAs Filename:="C:\Users\MMurrer\Desktop\" & sheetname & ".csv", _
FileFormat:=xlCSV, CreateBackup:=False
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment