1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
Dim update_Valeur as Boolean
Private Sub CB_SELECTION_Click()
Dim i As Integer
update_Value = True
LB_OPTION_Change
End Sub
Private Sub LB_OPTION_Change()
Dim i As Integer
Dim tout As Boolean
If update_Value = True Then
If CB_SELECTION.Value = True Then
For i = 0 To LB_OPTION.ListCount - 1
If LB_OPTION.Selected(i) = False Then
LB_OPTION.Selected(i) = True
End If
Next i
Else
For i = 0 To LB_OPTION.ListCount - 1
If LB_OPTION.Selected(i) = True Then
LB_OPTION.Selected(i) = False
End If
Next i
End If
Else
update_Value = False
tout = True
For i = 0 To LB_OPTION.ListCount - 1
If LB_OPTION.Selected(i) = False Then
tout = False
End If
Next i
If tout = False Then
CB_SELECTION.Value = False
Else
CB_SELECTION.Value = True
End If
End If
End Sub |
Partager