Relative Content

Tag Archive for vbavlookup

Error 1004: Unable to get the vlookup property of the worksheet function class:

I’m having the issue in the subject while I’m doing a vlookup, this is the code, could someone please help me:
Private Sub cradle_afterupdate()
If WorksheetFunction.CountIf(Sheet1.Range(“A:A”), Me.cradle.Value) = 0 Then
MsgBox “Production order not found”
Me.cradle.Value = “”
Exit Sub
End If
With Me
.Label2 = Application.WorksheetFunction.VLookup(Me.cradle, Sheet1.Range(“A:T”), 20, 0)
End With
End Sub