Q. Find an item in ComboBox?
I would like to be able to find an item that is already
added to a ComboBox either by using the item itself to
search or using itemdata. Does Combobox.Sorted have to
be True?
I have tried to use SendMessage API function
with "CB_FindString" and "CB_FindStringExact"
parameter, but it doesn`t work.
A. To find an item in a combobox, iterate through the
control`s List property:
MyName = "Bob"
For i = 0 to Combo1.ListCount - 1
If Combo1.List(i) = MyName Then
Exit For
End If
Next
A do loop would work as well. No need for API calls for
this one, unless the list is inordinately long.
(25-Aug-98 Bob Walsh rlwalsh@capecod.net)
Downloads
In IE right-click and select 'Save Target As...' or in Netscape
right-click and select 'Save Link As...'
View Plain Text
Not Available
Not Available