I am receiving the "unable to get the vlookup property of the worksheet fuction class" error on the line below.
The variable StartDate and SearchArray are constructed with the code below.
Any ideas as to why I might be receiving this error?
**unrelated
I shouldn't use the worksheet name "ActiveSheet" because of the object Activesheet, but i did in this case, apologies, just a heads up.
Code:
Set RngStart = Application.WorksheetFunction.VLookup(StartDate, SearchArray, 2, False)
The variable StartDate and SearchArray are constructed with the code below.
Code:
StartDate = Sheets("AllDistanceMeasures").Cells(aa, 9).value
Code:
With ActiveWorkbook.Sheets("ActiveSheet")
EndArray = .Cells(Rows.Count, 6).End(xlUp).Row
Set SearchArray = .Range("E6", .Cells(EndArray, "F"))
End With
Any ideas as to why I might be receiving this error?
**unrelated
I shouldn't use the worksheet name "ActiveSheet" because of the object Activesheet, but i did in this case, apologies, just a heads up.