Hi all
As the title says, I'm trying to reference one workbook from the macro code of another workbook.
The macro code is comparing values on 2 workbooks and the one in which the code is written is the active workbook.
Is this the correct code to reference the two workbooks?
Cheers
As the title says, I'm trying to reference one workbook from the macro code of another workbook.
The macro code is comparing values on 2 workbooks and the one in which the code is written is the active workbook.
Code:
Set Erng2 = ActiveWorkbook.Sheet5.Range("R1:R50")
Set Erngr2 = Workbooks(Filename.xls).Sheet6.Range("A1:A20")
Is this the correct code to reference the two workbooks?
Cheers