Sub MaFonction(Truc() as Label, Index as integer) For a = 1 To 5 If Truc(a).Caption = "50" Then Truc(a).Visible = True Truc(a).Caption = Index End If Next a End Sub
Private Sub GroupeLabel1_Click(Index As Integer) call MaFonction(TonTableauContenantLeGroupeLabel21, Index) End Sub
'En Haut du form Private Tableau(1 to 20) as Label 'Dans le Form Load For i = 1 To 20 SET Tableau(i) = GroupeLabel1(i) Next Et ainsi de suite pour tes 10 groupes ....
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question... = MonLabel.Indexpar
...= MonLabel.Name
Private Sub GroupeLabel1_Click(Index As Integer) Dim a As Integer For a = 1 To 5 If GroupeLabel21(a).Caption = 50 Then GroupeLabel21(a).Visible = True GroupeLabel21(a).Caption = GroupeLabel1(Index).Index End If Next a End Sub