VBE313
Well-known Member
- Joined
- Mar 22, 2019
- Messages
- 686
- Office Version
- 365
- Platform
- Windows
Sub TextBox4_Change()
sFind = Me.TextBox4.text
If Len(sFind) = 0 Then
Me.ListBox4.ListIndex = -1
Me.ListBox4.TopIndex = 0
Else
For I = 0 To Me.ListBox4.ListCount - 1
If InStr(UCase(ListBox4.List(I)), UCase(sFind)) > 0 Then
Me.ListBox4.TopIndex = I
Me.ListBox4.ListIndex = I
Exit For
End If
Next I
End If
End Sub
sFind = Me.TextBox4.text
If Len(sFind) = 0 Then
Me.ListBox4.ListIndex = -1
Me.ListBox4.TopIndex = 0
Else
For I = 0 To Me.ListBox4.ListCount - 1
If InStr(UCase(ListBox4.List(I)), UCase(sFind)) > 0 Then
Me.ListBox4.TopIndex = I
Me.ListBox4.ListIndex = I
Exit For
End If
Next I
End If
End Sub