Hi All, I want to populate a userform based on a value based on a vLookup formula. The textbox is not being populated, and I can't figure out why... I'm getting an error
...any ideas?
Here's the code:Unable to get the vLookup property of the WorksheetFunction class
VBA Code:
Private Sub cboSN_Change()
Dim ws As Worksheet
Dim sRange As Range
Dim lRow As Long
Set ws = Sheets("Lookup")
lRow = ws.Cells(Rows.Count, "G").End(xlUp).Row
Set sRange = ws.Range("G1:I" & lRow)
Me.txtCustomer = Application.WorksheetFunction.VLookup(Me.cboSN, sRange, 3, False)
Me.txtModel = Application.WorksheetFunction.VLookup(Me.cboSN, sRange, 2, False)
End Sub
...any ideas?