Created
August 1, 2017 08:23
-
-
Save mamu7211/7138a7df26e2a14e77417cde75f30618 to your computer and use it in GitHub Desktop.
Save All XLS Worksheets as CSV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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