0

I'm trying to set a range for a Vlookup from another workbook but I keep receiving 424 Object Required Errors and I can't see why

Sub DosiDo()
Dim table1 As Range
Set table1 = Workbooks(210721 - LeaveRecords.xlsm).Sheets(Sheet1).Range(Cells(2, 2), Cells(7, 9))
End Sub

1 Answers1

0

Missing double quotes:

Sub DosiDo()
    Dim table1 As Range
    Set table1 = Workbooks("210721 - LeaveRecords.xlsm").Sheets("Sheet1").Range(Cells(2, 2), Cells(7, 9))
End Sub
Gary's Student
  • 95,722
  • 10
  • 59
  • 99