krijg de volgende foutmelding als er geen of geen geldige opzoekwaarde is ingevuld:
runtime error 1004 : unable to get the vlookup property of the worksheet function class.
dit heb ik proberen op te lossen met iserror() nog steeds dezelfde foutmelding.
Wat doe ik fout:
Code
Private Sub CommandButton1_Click()
Dim Result As Variant
Result = Application.WorksheetFunction.VLookup(TextBox1.Value, Range("A4:Q10001"), 2, False)
If IsError(Result) Then
MsgBox "Not found"
Else
TextBox2.Value = Result
End If
End Sub
runtime error 1004 : unable to get the vlookup property of the worksheet function class.
dit heb ik proberen op te lossen met iserror() nog steeds dezelfde foutmelding.
Wat doe ik fout:
Code
Private Sub CommandButton1_Click()
Dim Result As Variant
Result = Application.WorksheetFunction.VLookup(TextBox1.Value, Range("A4:Q10001"), 2, False)
If IsError(Result) Then
MsgBox "Not found"
Else
TextBox2.Value = Result
End If
End Sub