Last active
October 17, 2020 07:03
-
-
Save imamuddinwp/43110671e0ee9189fd07d7940defe6a8 to your computer and use it in GitHub Desktop.
Split Each Excel Sheet Into Separate Files : Excel VBA Macro imamuddinwp.
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 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