Skip to content

Instantly share code, notes, and snippets.

@mubaidr
Created June 15, 2019 05:49
Show Gist options
  • Save mubaidr/71aa219fa3b3613395a1498e12c4c0ac to your computer and use it in GitHub Desktop.
Save mubaidr/71aa219fa3b3613395a1498e12c4c0ac to your computer and use it in GitHub Desktop.
Sub Splitbook()
'Updateby20140612
Dim xPath As String
xPath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each xWs In ThisWorkbook.Sheets
xWs.Copy
Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & xWs.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