Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
François Picalausa
Bonjour/soir,
Jette un oeil à la propriété Select. Dim ItemsLeft As Long, i as long ItemsLeft = List.SelCount
Do While ItemsLeft And i < List.ListCount If List.Selected(i) Then ItemsLeft =ItemsLeft -1 Msgbox List.List(i) Msgbox "Encore " & ItemsLeft & "éléments restant à trouver" End If i = i + 1 Loop
-- François Picalausa (MVP VB) http://faq.vb.free.fr --- http://msdn.microsoft.com http://apisvb.europe.webmatrixhosting.net
"Jean-Michel" a écrit dans le message de news:
Bonjour,
Comment je peux récupérer le numero de plusieurs lignes d'une listbox au cas ou l'operateur selectionne plusieurs lignes grace à ctrl !
Merci pour votre aide !
Jean-Michel
Bonjour/soir,
Jette un oeil à la propriété Select.
Dim ItemsLeft As Long, i as long
ItemsLeft = List.SelCount
Do While ItemsLeft And i < List.ListCount
If List.Selected(i) Then
ItemsLeft =ItemsLeft -1
Msgbox List.List(i)
Msgbox "Encore " & ItemsLeft & "éléments restant à trouver"
End If
i = i + 1
Loop
--
François Picalausa (MVP VB)
http://faq.vb.free.fr --- http://msdn.microsoft.com
http://apisvb.europe.webmatrixhosting.net
"Jean-Michel" <jeneveuxpasdespam_coconuts@genial.net> a écrit dans le
message de news:O8RnRuWIEHA.3224@TK2MSFTNGP09.phx.gbl
Bonjour,
Comment je peux récupérer le numero de plusieurs lignes d'une listbox
au cas ou l'operateur selectionne plusieurs lignes grace à ctrl !
Jette un oeil à la propriété Select. Dim ItemsLeft As Long, i as long ItemsLeft = List.SelCount
Do While ItemsLeft And i < List.ListCount If List.Selected(i) Then ItemsLeft =ItemsLeft -1 Msgbox List.List(i) Msgbox "Encore " & ItemsLeft & "éléments restant à trouver" End If i = i + 1 Loop
-- François Picalausa (MVP VB) http://faq.vb.free.fr --- http://msdn.microsoft.com http://apisvb.europe.webmatrixhosting.net
"Jean-Michel" a écrit dans le message de news:
Bonjour,
Comment je peux récupérer le numero de plusieurs lignes d'une listbox au cas ou l'operateur selectionne plusieurs lignes grace à ctrl !
Merci pour votre aide !
Jean-Michel
ng
Salut,
Le controle doit déjà être en MutliSelect = True, il suffit alors de boucler les item :
Private Sub Command1_Click() Dim i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) = True Then MsgBox "L'item #" & (i + 1) & " est sélectionné !" End If Next End Sub
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/ http://apisvb.europe.webmatrixhosting.net/
Jean-Michel a écrit :
Bonjour,
Comment je peux récupérer le numero de plusieurs lignes d'une listbox au cas ou l'operateur selectionne plusieurs lignes grace à ctrl !
Merci pour votre aide !
Jean-Michel
Salut,
Le controle doit déjà être en MutliSelect = True, il suffit alors de boucler
les item :
Private Sub Command1_Click()
Dim i As Integer
For i = 0 To List1.ListCount - 1
If List1.Selected(i) = True Then
MsgBox "L'item #" & (i + 1) & " est sélectionné !"
End If
Next
End Sub
--
Nicolas G.
FAQ VB : http://faq.vb.free.fr
API Guide : http://www.allapi.net
Google Groups : http://groups.google.fr/
MZ-Tools : http://www.mztools.com/
http://apisvb.europe.webmatrixhosting.net/
Jean-Michel <jeneveuxpasdespam_coconuts@genial.net> a écrit :
Bonjour,
Comment je peux récupérer le numero de plusieurs lignes d'une listbox
au cas ou l'operateur selectionne plusieurs lignes grace à ctrl !
Le controle doit déjà être en MutliSelect = True, il suffit alors de boucler les item :
Private Sub Command1_Click() Dim i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) = True Then MsgBox "L'item #" & (i + 1) & " est sélectionné !" End If Next End Sub
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/ http://apisvb.europe.webmatrixhosting.net/
Jean-Michel a écrit :
Bonjour,
Comment je peux récupérer le numero de plusieurs lignes d'une listbox au cas ou l'operateur selectionne plusieurs lignes grace à ctrl !
Merci pour votre aide !
Jean-Michel
Jean-Michel
merci je vais essayer
"ng" a écrit dans le message de news:
Salut,
Le controle doit déjà être en MutliSelect = True, il suffit alors de
boucler
les item :
Private Sub Command1_Click() Dim i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) = True Then MsgBox "L'item #" & (i + 1) & " est sélectionné !" End If Next End Sub
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/ http://apisvb.europe.webmatrixhosting.net/
Jean-Michel a écrit :
> Bonjour, > > Comment je peux récupérer le numero de plusieurs lignes d'une listbox > au cas ou l'operateur selectionne plusieurs lignes grace à ctrl ! > > Merci pour votre aide ! > > Jean-Michel
merci je vais essayer
"ng" <ng@babeuk.net> a écrit dans le message de
news:umAiTyWIEHA.2524@TK2MSFTNGP11.phx.gbl...
Salut,
Le controle doit déjà être en MutliSelect = True, il suffit alors de
boucler
les item :
Private Sub Command1_Click()
Dim i As Integer
For i = 0 To List1.ListCount - 1
If List1.Selected(i) = True Then
MsgBox "L'item #" & (i + 1) & " est sélectionné !"
End If
Next
End Sub
--
Nicolas G.
FAQ VB : http://faq.vb.free.fr
API Guide : http://www.allapi.net
Google Groups : http://groups.google.fr/
MZ-Tools : http://www.mztools.com/
http://apisvb.europe.webmatrixhosting.net/
Jean-Michel <jeneveuxpasdespam_coconuts@genial.net> a écrit :
> Bonjour,
>
> Comment je peux récupérer le numero de plusieurs lignes d'une listbox
> au cas ou l'operateur selectionne plusieurs lignes grace à ctrl !
>
> Merci pour votre aide !
>
> Jean-Michel
Le controle doit déjà être en MutliSelect = True, il suffit alors de
boucler
les item :
Private Sub Command1_Click() Dim i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) = True Then MsgBox "L'item #" & (i + 1) & " est sélectionné !" End If Next End Sub
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/ http://apisvb.europe.webmatrixhosting.net/
Jean-Michel a écrit :
> Bonjour, > > Comment je peux récupérer le numero de plusieurs lignes d'une listbox > au cas ou l'operateur selectionne plusieurs lignes grace à ctrl ! > > Merci pour votre aide ! > > Jean-Michel
ng
ReSalut,
Petite correction :
Private Sub Command1_Click() Dim i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) Then MsgBox "L'item #" & (i + 1) & " est sélectionné !" End If Next End Sub
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/ http://apisvb.europe.webmatrixhosting.net/
ng a écrit :
Salut,
Le controle doit déjà être en MutliSelect = True, il suffit alors de boucler les item :
Private Sub Command1_Click() Dim i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) = True Then MsgBox "L'item #" & (i + 1) & " est sélectionné !" End If Next End Sub
Bonjour,
Comment je peux récupérer le numero de plusieurs lignes d'une listbox au cas ou l'operateur selectionne plusieurs lignes grace à ctrl !
Merci pour votre aide !
Jean-Michel
ReSalut,
Petite correction :
Private Sub Command1_Click()
Dim i As Integer
For i = 0 To List1.ListCount - 1
If List1.Selected(i) Then
MsgBox "L'item #" & (i + 1) & " est sélectionné !"
End If
Next
End Sub
--
Nicolas G.
FAQ VB : http://faq.vb.free.fr
API Guide : http://www.allapi.net
Google Groups : http://groups.google.fr/
MZ-Tools : http://www.mztools.com/
http://apisvb.europe.webmatrixhosting.net/
ng <ng@babeuk.net> a écrit :
Salut,
Le controle doit déjà être en MutliSelect = True, il suffit alors de
boucler les item :
Private Sub Command1_Click()
Dim i As Integer
For i = 0 To List1.ListCount - 1
If List1.Selected(i) = True Then
MsgBox "L'item #" & (i + 1) & " est sélectionné !"
End If
Next
End Sub
Bonjour,
Comment je peux récupérer le numero de plusieurs lignes d'une listbox
au cas ou l'operateur selectionne plusieurs lignes grace à ctrl !
Private Sub Command1_Click() Dim i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) Then MsgBox "L'item #" & (i + 1) & " est sélectionné !" End If Next End Sub
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/ http://apisvb.europe.webmatrixhosting.net/
ng a écrit :
Salut,
Le controle doit déjà être en MutliSelect = True, il suffit alors de boucler les item :
Private Sub Command1_Click() Dim i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) = True Then MsgBox "L'item #" & (i + 1) & " est sélectionné !" End If Next End Sub
Bonjour,
Comment je peux récupérer le numero de plusieurs lignes d'une listbox au cas ou l'operateur selectionne plusieurs lignes grace à ctrl !
Merci pour votre aide !
Jean-Michel
Jean-Michel
J'ai un probleme, c'est que ca me dit erreur de compilation sur List1.ListCount Pareil pour SelCount et ListCound, il ne coonnait pas ces propriété, pk ?
Merci !
"ng" a écrit dans le message de news:%
ReSalut,
Petite correction :
Private Sub Command1_Click() Dim i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) Then MsgBox "L'item #" & (i + 1) & " est sélectionné !" End If Next End Sub
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/ http://apisvb.europe.webmatrixhosting.net/
ng a écrit :
> Salut, > > Le controle doit déjà être en MutliSelect = True, il suffit alors de > boucler les item : > > Private Sub Command1_Click() > Dim i As Integer > For i = 0 To List1.ListCount - 1 > If List1.Selected(i) = True Then > MsgBox "L'item #" & (i + 1) & " est sélectionné !" > End If > Next > End Sub > > > > >> Bonjour, >> >> Comment je peux récupérer le numero de plusieurs lignes d'une listbox >> au cas ou l'operateur selectionne plusieurs lignes grace à ctrl ! >> >> Merci pour votre aide ! >> >> Jean-Michel
J'ai un probleme, c'est que ca me dit erreur de compilation sur
List1.ListCount
Pareil pour SelCount et ListCound, il ne coonnait pas ces propriété, pk ?
Merci !
"ng" <ng@babeuk.net> a écrit dans le message de
news:%236VetlgIEHA.2876@TK2MSFTNGP09.phx.gbl...
ReSalut,
Petite correction :
Private Sub Command1_Click()
Dim i As Integer
For i = 0 To List1.ListCount - 1
If List1.Selected(i) Then
MsgBox "L'item #" & (i + 1) & " est sélectionné !"
End If
Next
End Sub
--
Nicolas G.
FAQ VB : http://faq.vb.free.fr
API Guide : http://www.allapi.net
Google Groups : http://groups.google.fr/
MZ-Tools : http://www.mztools.com/
http://apisvb.europe.webmatrixhosting.net/
ng <ng@babeuk.net> a écrit :
> Salut,
>
> Le controle doit déjà être en MutliSelect = True, il suffit alors de
> boucler les item :
>
> Private Sub Command1_Click()
> Dim i As Integer
> For i = 0 To List1.ListCount - 1
> If List1.Selected(i) = True Then
> MsgBox "L'item #" & (i + 1) & " est sélectionné !"
> End If
> Next
> End Sub
>
>
>
>
>> Bonjour,
>>
>> Comment je peux récupérer le numero de plusieurs lignes d'une listbox
>> au cas ou l'operateur selectionne plusieurs lignes grace à ctrl !
>>
>> Merci pour votre aide !
>>
>> Jean-Michel
J'ai un probleme, c'est que ca me dit erreur de compilation sur List1.ListCount Pareil pour SelCount et ListCound, il ne coonnait pas ces propriété, pk ?
Merci !
"ng" a écrit dans le message de news:%
ReSalut,
Petite correction :
Private Sub Command1_Click() Dim i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) Then MsgBox "L'item #" & (i + 1) & " est sélectionné !" End If Next End Sub
-- Nicolas G. FAQ VB : http://faq.vb.free.fr API Guide : http://www.allapi.net Google Groups : http://groups.google.fr/ MZ-Tools : http://www.mztools.com/ http://apisvb.europe.webmatrixhosting.net/
ng a écrit :
> Salut, > > Le controle doit déjà être en MutliSelect = True, il suffit alors de > boucler les item : > > Private Sub Command1_Click() > Dim i As Integer > For i = 0 To List1.ListCount - 1 > If List1.Selected(i) = True Then > MsgBox "L'item #" & (i + 1) & " est sélectionné !" > End If > Next > End Sub > > > > >> Bonjour, >> >> Comment je peux récupérer le numero de plusieurs lignes d'une listbox >> au cas ou l'operateur selectionne plusieurs lignes grace à ctrl ! >> >> Merci pour votre aide ! >> >> Jean-Michel