Hi,
I have a workbook with 27 sheets where 4 (A, B, C, D) of them are reference sheets and the rest are reporting sheets (1-23). I'd like to create 23 individual workbooks that consist of 4 reference sheets A, B, C, D and 1 reporting sheet. Sheet names for reporting sheets are stored in the named range "Subs"
Here is the code I am trying to use but it generates "Subscript out of Range" Error 9.
Sub CopyPasteComboTabs()
Dim strSaveName As String
Dim xPath As String
xPath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each c In Range("Subs")
strSaveName = c.Value
Sheets(strSaveName).Activate
Sheets(Array("A", "B", "C", "D", strSaveName)).Select
Sheets(Array("A", "B", "C", "D", strSaveName)).Copy
Next
Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & strSaveName & ".xls"
Application.ActiveWorkbook.Close True
End Sub
Please Help me understand why it would not work?
Bookmarks