I have 2 workbooks I want to combine into one. One has 100 sheets and the other has 89 sheets. I'd like to do it with a macro to speed it up.
I tried to use the macro recorder to so it however when I run the macro again I get an out of range error. WHen I look at the code I see this:
In looking at the code I see what the issue is. It is specifying the sheet it wants to go to. Well, if it is already moved to the other workbook then it will throw the error.
My question is - how can I put my list of sheets in an array so I can move them in one go or just have it read the list of pages and pick the first one and move it, then repeat? Thanks in advance.
I tried to use the macro recorder to so it however when I run the macro again I get an out of range error. WHen I look at the code I see this:
Code:
Sub Macro1()'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+t
'
Sheets("Monthly_ADB__c-Monthly ADB La1").Select
Sheets("Monthly_ADB__c-Monthly ADB La1").Move After:=Workbooks( _
"Page layouts.xlsx").Sheets(102)
Windows("Layout_6_25_2019 2_05 PM.xls").Activate
End Sub
My question is - how can I put my list of sheets in an array so I can move them in one go or just have it read the list of pages and pick the first one and move it, then repeat? Thanks in advance.