Oprichnick
Board Regular
- Joined
- May 30, 2013
- Messages
- 69
Hello,
I have this code that splits all my sheets in the workbook in new files.
Is it possible to make exceptions based on the name of a sheet?
Thanks,
Pedro
I have this code that splits all my sheets in the workbook in new files.
Code:
Sub Splitbook()
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 & ".xls"
Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
MsgBox ("The Splitting is Done")
End Sub
Is it possible to make exceptions based on the name of a sheet?
Thanks,
Pedro