PDA

View Full Version : Solved: Search box on an user form



Gunilla
09-16-2011, 05:37 AM
Hi
I am using Excel 2003 and on an userform I want to have a field (txtSearch) that I can use as SEARCH. The word in the search field are to search for a match in a listbox (lbAvfall) and when the word is found, activate that word. It shouldn't be too complicated but I can't get it to work.
:dunno Gunilla

mikerickson
09-16-2011, 07:04 AM
With lbAvFall
For i = 0 to .ListCount - 1
if .List(i) = txtSearch.Text Then
.Selected(i) = True
End If
Next i
End With

Gunilla
09-16-2011, 07:20 AM
Thank you I knew I could count on my friends on the Forum
:hi: