Hi - I'm creating a userform where I'd like to have about 10 checkboxes. How would I go about creating another check box that would select/unselect those 10 boxes?
I tried googling it and came across this piece of code below, but it only selects all. It doesn't allow me to unselect all. Please help. Thanks
Private Sub SelectAllCheckBox_Click()
Dim oCtrl As Control
For Each oCtrl In Me.Controls
If TypeOf oCtrl Is msforms.CheckBox Then
oCtrl.Value = True
End If
Next
End Sub
I tried googling it and came across this piece of code below, but it only selects all. It doesn't allow me to unselect all. Please help. Thanks
Private Sub SelectAllCheckBox_Click()
Dim oCtrl As Control
For Each oCtrl In Me.Controls
If TypeOf oCtrl Is msforms.CheckBox Then
oCtrl.Value = True
End If
Next
End Sub