Private Sub lbEmploye_Click()
Dim n As Integer, w As Integer
'Vérifier si on a sélectionné un employé
n = 0
w = 0
For n = 0 To lbEmploye.ListCount - 1
If lbEmploye.Selected(n) Then
w = 1
Else
End If
Next n
' Si on a un employé de sélectionner on coche l'option button "tous les employés"
If w = 1 Then
obTousEmployes = False
Else
obTousEmployes = True
End If
End Sub
Private Sub obTousEmployes_Click()
Dim n As Integer
'Effacer la liste des employés que l'on a déjà sélectionné
n = 0
For n = 0 To lbEmploye.ListCount - 1
If lbEmploye.Selected(n) Then
lbEmploye.Selected(n) = False
Else
End If
Next n
End Sub