Skip to content

Instantly share code, notes, and snippets.

@imamuddinwp
Last active October 17, 2020 07:03
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 imamuddinwp/43110671e0ee9189fd07d7940defe6a8 to your computer and use it in GitHub Desktop.
Save imamuddinwp/43110671e0ee9189fd07d7940defe6a8 to your computer and use it in GitHub Desktop.
Split Each Excel Sheet Into Separate Files : Excel VBA Macro imamuddinwp.
Sub Sheets_To_File()
Dim filePath As String
filePath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each ws In ThisWorkbook.Sheets
ws.Copy
Application.ActiveWorkbook.SaveAs Filename:=filePath & "\" & ws.Name & ".xlsx"
Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment