Apr 06 2022 09:18 AM
Hello all, I am trying to save 50+ sheets that are currently in one workbook as individual excel files. Is this possible? When I try to save, it is saving the entire workbook instead of the specific sheet.
Apr 06 2022 12:03 PM
Using a macro:
Sub SaveSheets()
Dim p As String
Dim w As Worksheet
p = ActiveWorkbook.Path
If Right(p, 1) <> Application.PathSeparator Then
p = p & Application.PathSeparator
End If
Application.DisplayAlerts = False
For Each w In Worksheets
w.Copy
ActiveWorkbook.SaveAs Filename:=p & w.Name & ".xlsx", FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
Next w
Application.DisplayAlerts = True
End Sub