View Single Post
 
Old 11-03-2019, 02:36 PM
Logit Logit is offline Windows 10 Office 2007
Expert
 
Join Date: Jan 2017
Posts: 591
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

This will save each sheet in the same location as the workbook :

Code:
Option Explicit

Sub save_each_sheet_as_separate_workbook()
     
     
    Dim wb As Workbook, ws As Worksheet
     
    Application.ScreenUpdating = False
    
''///////////   Include WB to be affectted in path below   \\\\\\\\\

    Set wb = ThisWorkbook 
     
    For Each ws In wb.Worksheets
        If ws.Visible = True Then 'handles hidden sheets
            ws.Copy
            With ActiveWorkbook
                .SaveAs Filename:=ThisWorkbook.Path & "\" & ws.Name, FileFormat:=56 '56 for xls, 51 for xlsx, 52 for xlsm
                .Close False
            End With
        End If
    Next ws
     
    wb.Close False
     
    Application.ScreenUpdating = True
     
End Sub
You can edit the path for your purposes.
Reply With Quote