cutemeatball
New Member
- Joined
- Jun 13, 2022
- Messages
- 20
- Office Version
- 365
- Platform
- Windows
Hello,
So I tried to make my own macro below and it doesn't seem to work. Gives me the error 9 message. Can anyone assist? Basically I am trying to split specific worksheets from a workbook and save them as a new workbooks (multiple workbooks).
So I tried to make my own macro below and it doesn't seem to work. Gives me the error 9 message. Can anyone assist? Basically I am trying to split specific worksheets from a workbook and save them as a new workbooks (multiple workbooks).
VBA Code:
Sub SplitTechnologies()
Call SheetstoBooksButch
Call SheetstoBooksSecurity
Call SheetstoBooksAV
Call SheetstoBooksDAS
End Sub
Sub SheetstoBooksButch()
ThisWorkbook.Sheets(Array("Security", "AV", "Wireless", "SEC & AV", "Security RSS", "AV RSS", "SEC & AV RSS", "AV Division", "Wireless Division")).Copy
ActiveWorkbook.SaveAs "SEC AV DAS"
End Sub
Sub SheetstoBooksSecurity()
ThisWorkbook.Sheets(Array("Security", "Security RSS")).Copy
ActiveWorkbook.SaveAs "SEC"
End Sub
Sub SheetstoBooksAV()
ThisWorkbook.Sheets(Array("AV", "AV RSS", "AV Division")).Copy
ActiveWorkbook.SaveAs "AV"
End Sub
Sub SheetstoBooksDAS()
ThisWorkbook.Sheets(Array("Wireless", "Wireless Division", "Burkhart", "Barnhill", "Allen", "Finger", "McCallum")).Copy
ActiveWorkbook.SaveAs "AV"
End Sub