Controle listbox
Résolu/Fermé
amine69500
Messages postés
418
Date d'inscription
lundi 8 juin 2009
Statut
Membre
Dernière intervention
25 août 2013
-
8 juin 2009 à 20:03
amine69500 Messages postés 418 Date d'inscription lundi 8 juin 2009 Statut Membre Dernière intervention 25 août 2013 - 10 juin 2009 à 09:50
amine69500 Messages postés 418 Date d'inscription lundi 8 juin 2009 Statut Membre Dernière intervention 25 août 2013 - 10 juin 2009 à 09:50
A voir également:
- Controle listbox
- Controle parental pc - Guide
- Contrôle wifi - Guide
- Controle de compte utilisateur - Guide
- Teamviewer controle à distance - Guide
- Controle temperature pc - Guide
4 réponses
Polux31
Messages postés
6917
Date d'inscription
mardi 25 septembre 2007
Statut
Membre
Dernière intervention
1 novembre 2016
1 204
8 juin 2009 à 20:30
8 juin 2009 à 20:30
Bonjour,
Supprime soit ListBox2.AddItem ListBox1.Text, soit ListBox2.AddItem ListBox1.Value, les 2 font la même chose.
;o)
Supprime soit ListBox2.AddItem ListBox1.Text, soit ListBox2.AddItem ListBox1.Value, les 2 font la même chose.
;o)
amine69500
Messages postés
418
Date d'inscription
lundi 8 juin 2009
Statut
Membre
Dernière intervention
25 août 2013
12
8 juin 2009 à 20:44
8 juin 2009 à 20:44
bonjour merci pour ta réponse
mais comment je peu faire pour que quand je sélectionne une ligne sur la listbox1,exemple (A 75: B75) , et je fais ajouter, toute la ligne s'affiche sur la listbox2
j'ai deux colonne dans la listbox1, et les colonnes sources sont: Rowsource= Feuil1! A 75 : B 176
les propriété de la listbox1 çà me donne çà :
text = mon premier text de la colonne (A75)
Value = mon premier text de la colonne 2 (B75)
c pour ça j'ai mis ça
Private Sub AddButton_Click()
If ListBox1.ListIndex = -1 Then Exit Sub
ListBox2.AddItem ListBox1.Text
ListBox2.AddItem ListBox1.Value
End Sub
mais comment je peu faire pour que quand je sélectionne une ligne sur la listbox1,exemple (A 75: B75) , et je fais ajouter, toute la ligne s'affiche sur la listbox2
j'ai deux colonne dans la listbox1, et les colonnes sources sont: Rowsource= Feuil1! A 75 : B 176
les propriété de la listbox1 çà me donne çà :
text = mon premier text de la colonne (A75)
Value = mon premier text de la colonne 2 (B75)
c pour ça j'ai mis ça
Private Sub AddButton_Click()
If ListBox1.ListIndex = -1 Then Exit Sub
ListBox2.AddItem ListBox1.Text
ListBox2.AddItem ListBox1.Value
End Sub
amine69500
Messages postés
418
Date d'inscription
lundi 8 juin 2009
Statut
Membre
Dernière intervention
25 août 2013
12
9 juin 2009 à 13:45
9 juin 2009 à 13:45
bonjour
voila j'ai essai de beduier mon programme , ca marche pour la premiere fois mais pas la fois d'apres
que pui-je faire svp
merci de votre aide
Private Sub AddButton_Click()
Dim i As Integer
If ListBox1.ListIndex = -1 Then Exit Sub
For i = 0 To ListBox3.ListCount - 1
If ListBox1.Value = ListBox3.List(i) Then
Beep
Exit Sub
End If
Next i
ListBox2.AddItem ListBox1.Text
i = _
Application.WorksheetFunction.CountA(Range("A:A")) - 464
If ListBox2 = ListBox1.Text Then
Cells(i, 3) = True
End If
ListBox3.AddItem ListBox1.Value
If ListBox3 = ListBox1.Value Then
Cells(i, 3) = True
End If
End Sub
bonne journer
voila j'ai essai de beduier mon programme , ca marche pour la premiere fois mais pas la fois d'apres
que pui-je faire svp
merci de votre aide
Private Sub AddButton_Click()
Dim i As Integer
If ListBox1.ListIndex = -1 Then Exit Sub
For i = 0 To ListBox3.ListCount - 1
If ListBox1.Value = ListBox3.List(i) Then
Beep
Exit Sub
End If
Next i
ListBox2.AddItem ListBox1.Text
i = _
Application.WorksheetFunction.CountA(Range("A:A")) - 464
If ListBox2 = ListBox1.Text Then
Cells(i, 3) = True
End If
ListBox3.AddItem ListBox1.Value
If ListBox3 = ListBox1.Value Then
Cells(i, 3) = True
End If
End Sub
bonne journer
amine69500
Messages postés
418
Date d'inscription
lundi 8 juin 2009
Statut
Membre
Dernière intervention
25 août 2013
12
10 juin 2009 à 09:50
10 juin 2009 à 09:50
bonjour
c bon jai trouver pour afficher la ligne entiere (premiere question)
au lieu d'utiliser 2 listbox , jai utiliser 3 listbox : voir l'explication
bouton ajouter
Private Sub AddButton_Click()
Dim i As Integer
If ListBox1.ListIndex = -1 Then Exit Sub
For i = 0 To ListBox3.ListCount - 1
If ListBox1.Value = ListBox3.List(i) Then
Beep
Exit Sub
End If
Next i
ListBox2.AddItem ListBox1.Text
ListBox3.AddItem ListBox1.Value
End Sub
c bon jai trouver pour afficher la ligne entiere (premiere question)
au lieu d'utiliser 2 listbox , jai utiliser 3 listbox : voir l'explication
bouton ajouter
Private Sub AddButton_Click()
Dim i As Integer
If ListBox1.ListIndex = -1 Then Exit Sub
For i = 0 To ListBox3.ListCount - 1
If ListBox1.Value = ListBox3.List(i) Then
Beep
Exit Sub
End If
Next i
ListBox2.AddItem ListBox1.Text
ListBox3.AddItem ListBox1.Value
End Sub