Hi
I have some basic code which should activate two different open workbooks.
But I get a run time error ("Subscript out of range") when I execute the code.
Any ideas why? The code is below and I copied and pasted the file names into the code.
Thanks in advance.
Sub ReferringToWorkbooks()
Workbooks("Book2.xlsx").Activate
Workbooks("VBA Lesson 7 - (Wise Owl).xlsm").Activate
End Sub
I have some basic code which should activate two different open workbooks.
But I get a run time error ("Subscript out of range") when I execute the code.
Any ideas why? The code is below and I copied and pasted the file names into the code.
Thanks in advance.
Sub ReferringToWorkbooks()
Workbooks("Book2.xlsx").Activate
Workbooks("VBA Lesson 7 - (Wise Owl).xlsm").Activate
End Sub