azizrasul
Well-known Member
- Joined
- Jul 7, 2003
- Messages
- 1,304
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
I get Run-time error '1004': Unable to get the VLookup property of the WorksheetFunction class on the VLookup line. Column H is formatted as date.
Code:
Dim intRow As Integer
Dim dteMax As Date
intRow = Worksheets("Customer Product Export").Range("L" & Rows.Count).End(xlUp).Row
dteMax = Application.WorksheetFunction.Max(Sheets("Customer Product Export").Range("H2:H" & intRow))
UpdateMembershipPlan = Application.WorksheetFunction.VLookup(dteMax, Sheets("Current").Range("H2:L" & intRow), 5, False)