cs_asasas
Messages postés62Date d'inscriptiondimanche 23 mars 2003StatutMembreDernière intervention 2 juin 2006
-
22 avril 2003 à 13:35
mattflyer
Messages postés63Date d'inscriptionsamedi 22 mars 2003StatutMembreDernière intervention29 novembre 2005
-
22 avril 2003 à 13:57
comment récupérer dans une variable la valeur d'un item choisi dans une combobox
mattflyer
Messages postés63Date d'inscriptionsamedi 22 mars 2003StatutMembreDernière intervention29 novembre 2005 22 avril 2003 à 13:55
salut alors moi je suis nouveau donc y a certainement plus simple mais bon .. tu as une combo et un bouton tu as deux item qui on t cahcun une valeur dans la cambo
Private Sub Command1_Click()
Dim ma As Integer
ma = c.ListIndex
MsgBox (ma)
End Sub
Private Sub Form_Load()
c.AddItem ("e")
c.AddItem ("r")
End Sub
si tu choisi "e" puis clilc tu aura "0"
si tu chosie "r" puis clilc tu aura "1"
etc
sino tu peut aussi afficher le texte qu e tu as chosi expemple
Private Sub Command1_Click()
Dim ma As Integer
ma = c.ListIndex
MsgBox (ma)
End Sub
Private Sub Form_Load()
c.AddItem ("e")
c.AddItem ("r")
End Sub
c étant le nom de combo
@+
j'epsere avoir répondu à ta question
et je suis débutant donc y a peut plus simple
bye
-------------------------
Bon ben on va s'y mettre non ? :big)
mattflyer
Messages postés63Date d'inscriptionsamedi 22 mars 2003StatutMembreDernière intervention29 novembre 2005 22 avril 2003 à 13:57
même pour le clic tu met simplement
Msgbox(c.listindex) tout simplement sans mettre de variable enfin j'ai mis une variable c t pour toi pour poouvoir l'utilisé apres mais si tu n'en avait pas besois
Private Sub Command1_Click()
MsgBox (c.ListIndex)
End Sub