Using this code to search a name list to fill a userform listbox. It works perfect if you type in the letter of last name,is there a way to change it to read if you type in first name. So the code will work
with either name? Seems I seen somewhere where the list would narrow down to a letter type,say S and it would show all last names with S
Name List
Smith Bob
Jones Frank
Code
Private Sub TextBox4_Change()
Dim bFound As Boolean
Dim intIndex As Integer
bFound = False
intIndex = 0
Do While Not bFound And intIndex < ListBox3.ListCount
If UCase(Left(ListBox3.List(intIndex), Len(TextBox4.Text))) = UCase(TextBox4.Text) Then
ListBox3.ListIndex = intIndex
bFound = True
End If
intIndex = intIndex + 1
Loop
End Sub
Display More
Thanks Z