Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find Item in ComboBox
Message
De
27/11/1998 06:38:05
Jody Cairns
OAO Technology Solutions
Moncton, Nouveau-Brunswick, Canada
 
 
À
26/11/1998 21:45:12
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00161888
Message ID:
00161910
Vues:
21
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform