Since you're really only using the checkbox to cause something to happen--not to
indicate a yes/no, on/off, 1/0 situation, how about an alternative?
How about using a couple of commandbuttons instead?
You'll find that the code is easier and as a user, I _think_ I've seen more
buttons do the "select all/Unselect All" processing than checkboxes.
Anyway, I put 3 commandbuttons on a userform and a little listbox.
This was the code behind the userform:
Option Explicit
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub CommandButton2_Click()
Dim iCtr As Long
With Me.ListBox1
For iCtr = 0 To .ListCount - 1
.Selected(iCtr) = True
Next iCtr
End With
End Sub
Private Sub CommandButton3_Click()
Dim iCtr As Long
With Me.ListBox1
For iCtr = 0 To .ListCount - 1
.Selected(iCtr) = False
Next iCtr
End With
End Sub
Private Sub UserForm_Initialize()
Dim iCtr As Long
With Me.ListBox1
.MultiSelect = fmMultiSelectMulti
For iCtr = 1 To 5
.AddItem "A" & iCtr
Next iCtr
End With
Me.CommandButton1.Caption = "Cancel"
Me.CommandButton2.Caption = "Select All"
Me.CommandButton3.Caption = "Unselect All"
End Sub