maval
XLDnaute Barbatruc
Bonjour,
J'ai un code pour ouvrir une listbox avec 21 label dans une frame, c'est à dire, que je click sur un label sa ouvre la listbox et met la frame non visible.
Problème j'ai code trop long j'aimerais faire une boucle pour réduire mon code.
Mon code
Je vous remercie d'avance
J'ai un code pour ouvrir une listbox avec 21 label dans une frame, c'est à dire, que je click sur un label sa ouvre la listbox et met la frame non visible.
Problème j'ai code trop long j'aimerais faire une boucle pour réduire mon code.
Mon code
Code:
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub CommandButton2_Click()
ListBox1.Visible = False
Frame1.Visible = True
End Sub
Private Sub Label1_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label2_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label3_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label4_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label5_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label6_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label7_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label8_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label9_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label10_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label11_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label12_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label13_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label14_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label15_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label16_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label17_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label18_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label19_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label20_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Private Sub Label21_Click()
ListBox1.Visible = True
Frame1.Visible = False
End Sub
Je vous remercie d'avance