does anyone have any info on: "link" a text box to a list box so the nearest match in the list box is selected when the user types text into the text box Remember amateurs built the ark - professionals built the Titanic
you need to put some VBA code in the key down or key up event of your textbox. The code will simply take what has been typed and loop through each item in the listbox to see if there is a match or likeness.
Private Sub Text0_KeyUp(KeyCode As Integer, Shift As Integer)
Dim strText As String
Dim i As Integer
strText = Text0.Text
For i = 0 To List4.ListCount
If strText = List4.ItemData(i) Then
List4.Selected(i) = True
End If
Next
Spoke to soon :-( What if I want to introduce '*' into the comparison so as the user enters text the selected field moves with them, as opposed to the way it is now the user must match the whole string for the desired affect Remember amateurs built the ark - professionals built the Titanic
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.