ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,199
- Office Version
- 2007
- Platform
- Windows
This is the code in use.
My userform is populated with values in a listbox.
I can either just select a value from the listbox or i can start to type in the textbox which then narrows down the listbox entries.
So lets assume these are the values in the listbox
72147-123
72158-269
72147-333
etc etc
So if i type 72147-124 the listbox will be now empty because no match was found.
It is at this point i would like to see a MsgBox " NO SUCH NUMBER FOUND"
My attempt below does nothing Ha Ha
My userform is populated with values in a listbox.
I can either just select a value from the listbox or i can start to type in the textbox which then narrows down the listbox entries.
So lets assume these are the values in the listbox
72147-123
72158-269
72147-333
etc etc
So if i type 72147-124 the listbox will be now empty because no match was found.
It is at this point i would like to see a MsgBox " NO SUCH NUMBER FOUND"
My attempt below does nothing Ha Ha
Rich (BB code):
Private Sub ListBox1_Click()
HondaParts.MyPartNumber.Text = ListBox1.Text
If ListBox1.Text = "" Then
MsgBox "no such number found"
End If
Unload Me
HondaParts.Show
End Sub