Workbook x is open.
I want to:
- Open Excel workbook y (the filepath is in cell "B2" of the macro tab of workbook x).
- Copy A3:A26 from macro tab of workbook x, and paste into M41:M63 in the summary tab of workbook y.
The problem is with the B2 filepath name. I think I need to specify to pull the text from B2 to open the correct workbook.
The error message is
Sorry, we couldn't find B2.xlsx
Sub Foo()
Dim x As Workbook
Dim y As Workbook
Set y = Workbooks.Open("B2")
x.Sheets("Macro").Range("A3:A26").Copy
y.Sheets("Summary").Range("M41:M63").PasteSpecial
End Sub