Hi,
I have the following code. It worked previously, but for some reason, it won't work now!
I get an error when I try to Set TRF below...
I have 2 workbooks open and I want to copy sheets from one workbook to another using a macro.
Any idea why I'm getting a "Run-time error '9': Subscript out of range" error?
Cheers,
Eoin
I have the following code. It worked previously, but for some reason, it won't work now!
I get an error when I try to Set TRF below...
Code:
s = "Nov Trend Report.xlsx"
v = Left(s, Len(s) - 5)
Windows("Trend Report Model.xlsm").Activate
Dim TRF As Workbook
Set TRF = Workbooks(v)
I have 2 workbooks open and I want to copy sheets from one workbook to another using a macro.
Any idea why I'm getting a "Run-time error '9': Subscript out of range" error?
Cheers,
Eoin