Buttercup143
New Member
- Joined
- Nov 12, 2024
- Messages
- 1
- Office Version
- 365
- 2021
- Platform
- Windows
I can split my work sheets into new workbooks using the below, but what do I add to it to make sure the formatting copies to the new workbook as well?
Sub SeparateSheetsIntoWorkbooks()
Dim ws As Worksheet
Dim wbPath As String
wbPath = ThisWorkbook.Path
For Each ws In ThisWorkbook.Worksheets
ws.Copy
With ActiveWorkbook
.SaveAs Filename:=wbPath & "\" & ws.Name
.Close
End With
Next
End Sub
Sub SeparateSheetsIntoWorkbooks()
Dim ws As Worksheet
Dim wbPath As String
wbPath = ThisWorkbook.Path
For Each ws In ThisWorkbook.Worksheets
ws.Copy
With ActiveWorkbook
.SaveAs Filename:=wbPath & "\" & ws.Name
.Close
End With
Next
End Sub