DEllis
Active Member
- Joined
- Jun 4, 2009
- Messages
- 344
- Office Version
- 365
- Platform
- Windows
I have a large workbook with multiple worksheets, I want each worksheet to be its own workbook, so I found a macro that sort of does this, but it keeps debugging on me. Here is the macro...what am I doing wrong?
Sub Parse_Sheets()
'
'Option Explicit
'Divide workbook into sheet pairs
Dim Cnt As Long
Dim i As Long
Dim strPath As String
Dim Sht1 As String
strPath = "C:\Users\E458758\Documents\TestMacro\" '<-change the path to suit
Cnt = Sheets.Count
For i = 1 To Cnt Step 2
Sht1 = Sheets(i).Name
Sheets(Array(Sht1)).Copy
ActiveWorkbook.SaveAs Filename:=strPath & Sht1 & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWorkbook.Close
Next i
End Sub
Sub Parse_Sheets()
'
'Option Explicit
'Divide workbook into sheet pairs
Dim Cnt As Long
Dim i As Long
Dim strPath As String
Dim Sht1 As String
strPath = "C:\Users\E458758\Documents\TestMacro\" '<-change the path to suit
Cnt = Sheets.Count
For i = 1 To Cnt Step 2
Sht1 = Sheets(i).Name
Sheets(Array(Sht1)).Copy
ActiveWorkbook.SaveAs Filename:=strPath & Sht1 & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWorkbook.Close
Next i
End Sub