Anybody on the Forum who could help with this would be great. When I run the code in VBA (see below) I get the error message "Run TIme error '1004': Unable to get the VLookup property of the WorksheetFunction class". The Debug takes me to the first line after the 'With Me' command.

Note when I run this from the UserForm a message box doed appear with the text I have input "This is an incorrect ID" as seen below in the code.


Private Sub EntClientIDbx_AfterUpdate()
'Check to see if value exists
If WorksheetFunction.CountIf(Sheet1.Range("B:B"), Me.EntClientIDbx.Value) = 0 Then
MsgBox "This is an incorrect ID"
Me.EntClientIDbx.Value = ""
Exit Sub
End If
'Lookup values based on first control
With Me
.ConfirmedClntName = Application.WorksheetFunction.VLookup(Me.EntClientIDbx, Sheet1.Range("Addressdata"), 3, 0) ------------Debug takes me here
.ConfirmedClntAddr1 = Application.WorksheetFunction.VLookup(Me.EntClientIDbx, Sheet1.Range("Addressdata"), 4, 0)
.ConfirmedClntCity = Application.WorksheetFunction.VLookup(Me.EntClientIDbx, Sheet1.Range("Addressdata"), 6, 0)
.ConfirmedClntPcode = Application.WorksheetFunction.VLookup(Me.EntClientIDbx, Sheet1.Range("Addressdata"), 7, 0)
End With
End Sub