Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find Item in ComboBox
Message
From
27/11/1998 06:38:05
Jody Cairns
OAO Technology Solutions
Moncton, New Brunswick, Canada
 
 
To
26/11/1998 21:45:12
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00161888
Message ID:
00161910
Views:
20
>anybody know how to find item in Combo Box ?, I try to use my program below but it does not work :
>
>For mCheck=1 to combo1.Listcount -1
> combo1.ListIndex = mcheck
> If combo1.text = txtFind.Text then
> msgbox "Found"
> Exit for
> End if
>Next mcheck

Your code has some errors. Try this instead:
With Combo1
  For mCheck = 0 to .ListCount -1
    If .List(mCheck) = txtFind.Text then
      msgbox "Found"
      exit for
    end if
  next mCheck
end with
You can use the API to search a list, too.

Best,

jody
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform