Set value of checkbox on userform without triggering Click event
Sub ClearCheckBoxes()
'Me.ListBox1.Clear...for ListBoxes
Dim ChkBox As Object
For Each ChkBox In UserForm1.CheckBoxes
ChkBox.Value = xlOff
Next ChkBox
End Sub
Sub EnterCheckBoxes()
'Me.ListBox1.Clear...for ListBoxes
Dim ChkBox As Object
For Each ChkBox In UserForm1.CheckBoxes
ChkBox.Value = xlOn
Next ChkBox
End Sub
HTH
Ryan---
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.
"Jonathan Brown" wrote:
I have a userform with several checkboxes on it. I have one "master"
checkbox that is supposed to be able to set all checkboxes true or false
based on its own state. So basically, if master checkbox is true then set
all checkboxes true, else if it's false then set all checkboxes false.
The annoying thing though is when it sets the value of each individual
checkbox it runs the code associated with each checkbox's click event. This
is slowing down my spreadsheet considerably.
Is it possible to set the value of a checkbox without Excel executing the
code associated with it's click event?
|