Hello,
I am trying to use VLOOKUP in my userform but I keep getting the error "Run-time '1004': Unable to get the VLookup property of the WorksheetFunction class". This error occurs when I enter 'Case 0' in the code below. Can someone help me figure out why this won't work? Thanks!
I am trying to use VLOOKUP in my userform but I keep getting the error "Run-time '1004': Unable to get the VLookup property of the WorksheetFunction class". This error occurs when I enter 'Case 0' in the code below. Can someone help me figure out why this won't work? Thanks!
Code:
Select Case ChargeType
Case 0
Worksheets("Liquid Control Sheet").Activate
Range("B8").Value = Range("B4").Value + 14.7 - Application.WorksheetFunction.VLookup(Range("B7"), Range("A32:B55"), 2, True)
Case 1
Worksheets("Other worksheet").Activate
Case 2
Worksheets("Something Else").Activate
End Select