I'm using the below code to move a worksheet from one open workbook to another open workbook but it's breaking on the last line of the code. From everything that I see online, it looks like this code should work.
Error MSG : (Run-time error '9') (Subscription out of range)
Sheets("Summary ML").Select
Workbooks.Open Filename:=outputfile
Windows(wb).Activate
Sheets("Summary ML").Select
Sheets("Summary ML").Copy After:=Workbooks("outputfile.xlsx").Sheets(2)