V
Vikram Dhemare
Dear All,
I have userform. As soon as the user selects the value from combobox the
another test box lookup the value from certain table & returns the result in
textbox. (Here I used the vlookup function).
The combobox list is having alphanumerical value as well as numerical value.
If user selects the alphanumerical value from combobox, it working fine. But
if user selects the numerical value, it doesn't work.The Vlookup function
fails here.
Any idea?
Codes are here:
Private Sub cboPart_Change()
Dim LookupRange As Range
On Error Resume Next
Err.Clear
Set LookupRange = Worksheets("LookupLists").Range("A:I")
If cboPart <> "" Then
Me.LblDesc = Application.WorksheetFunction.VLookup _
(Me.cboPart.Value, LookupRange, 3, 0)
If Err.Number <> 0 Then
MsgBox "An Error occurred ! Plz. check the Part Code!"
Exit Sub
End If
End If
End Sub
I have userform. As soon as the user selects the value from combobox the
another test box lookup the value from certain table & returns the result in
textbox. (Here I used the vlookup function).
The combobox list is having alphanumerical value as well as numerical value.
If user selects the alphanumerical value from combobox, it working fine. But
if user selects the numerical value, it doesn't work.The Vlookup function
fails here.
Any idea?
Codes are here:
Private Sub cboPart_Change()
Dim LookupRange As Range
On Error Resume Next
Err.Clear
Set LookupRange = Worksheets("LookupLists").Range("A:I")
If cboPart <> "" Then
Me.LblDesc = Application.WorksheetFunction.VLookup _
(Me.cboPart.Value, LookupRange, 3, 0)
If Err.Number <> 0 Then
MsgBox "An Error occurred ! Plz. check the Part Code!"
Exit Sub
End If
End If
End Sub