Affichage ListBox dans label

Résolu
chubaka73 Messages postés 22 Date d'inscription mardi 22 janvier 2002 Statut Membre Dernière intervention 5 septembre 2007 - 6 août 2005 à 20:47
chubaka73 Messages postés 22 Date d'inscription mardi 22 janvier 2002 Statut Membre Dernière intervention 5 septembre 2007 - 6 août 2005 à 22:35
Bonsoir,

Sur mon formulaire je souhaite avoir une ListBox d'un coté, de l'autre un label et que dans ce label s'affiche un élément de ma listbox que je fais défiler en cliquant sur un bouton précédent ou suivant.
J'espère avoir été assez explicite.

Merci par avance de vos réponses et bonne soirée.

Chubaka73

2 réponses

Gobillot Messages postés 3140 Date d'inscription vendredi 14 mai 2004 Statut Membre Dernière intervention 11 mars 2019 34
6 août 2005 à 21:00
Private Sub CmdPrecedent_Click()

Dim i As Integer

i = List1.ListIndex

If i > 0 Then

i = i - 1

List1.ListIndex = i

Label1 = List1.List(i)

End If

End Sub



Private Sub CmdSuivant_Click()

Dim i As Integer

i = List1.ListIndex

If i < List1.ListCount - 1 Then

i = i + 1

List1.ListIndex = i

Label1 = List1.List(i)

End If

End Sub


Daniel
3
chubaka73 Messages postés 22 Date d'inscription mardi 22 janvier 2002 Statut Membre Dernière intervention 5 septembre 2007
6 août 2005 à 22:35
Je te remercie beaucoup, je pense grâce à ton aide avoir compris pas mal de choses.

Encore merci, bonne fin de week end et bonne programmation

Chubaka73
0
Rejoignez-nous