Howdy y'all:
I'm using a userForm to allow the user to select a driver and then I want to come up with the selected Driver's ID from a listing. From within the spreadsheet, the vLookup works fine but I keep getting Error 1004 when I try to run it from within the userForm. The driverName part is working fine. Any ideas?
TIA.
Bob
Here's the code:
Private Sub CommandButton1_Click()
Dim driverName As String
driverName = Me.lbSelectDriver.Value
MsgBox driverName
MsgBox Application.WorksheetFunction.VLookup(driverName, "lookupData!ba1:bb250", 2)
Unload Me
End Sub
Bookmarks