I'm trying to copy data in Cell F33 on one workbook to cell B5 on another workbook. Whenever I run the code, I get "subscript out of range" and the debugger highlights the 6th line, containing the copy range.
Any thoughts on why this is happening?
Code:
Sub Copy()
Dim x As Workbook
Dim y As Workbook
Set x = Workbooks.Open("Report")
Set y = Workbooks.Open("Output")
x.Sheets("Leader").Range("F33").Copy
y.Sheets("Shell").Range("B5").PasteSpecial
End Sub
Any thoughts on why this is happening?