I want to populate TextBox2 in a form with the value in TextBox1 that uses a VLOOKUP function. I have scoured the net and have come up with this.
Private Sub TextBox1_Change()
Dim rngFind As Range
Set rngFind = Sheet1.[A7:J86]
On Error Resume Next
TextBox2.Text = WorksheetFunction.VLookup(TextBox1.Value, rngFind, 10, False)
On Error GoTo 0
End Sub
However, this does not appear to do anything. I type a string that matches a value in the lookup range, and nothing appears to happen. I have just recently acquainted myself with VB and am very green. Please tell me it is something simple I am missing.
Thanks. B
Bookmarks