Skip to content

Instantly share code, notes, and snippets.

@jay-babu
Created March 24, 2021 23:59
Show Gist options
  • Save jay-babu/bd6af79e5adeceb48e195d6906d1360c to your computer and use it in GitHub Desktop.
Save jay-babu/bd6af79e5adeceb48e195d6906d1360c to your computer and use it in GitHub Desktop.
Excel VBA
'Code Created by Sumit Bansal from trumpexcel.com
Sub SplitEachWorksheet()
Dim FPath As String
FPath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each ws In ThisWorkbook.Sheets
ws.Copy
Application.ActiveWorkbook.SaveAs Filename:=FPath & "\" & 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