1 click for all checkboxes

  • Thread starter Thread starter Zurn
  • Start date Start date
Z

Zurn

I have many check boxes, now I want to check them all in one time.

How to do this
 
hi,
lot of ways to do this
you could put a label above the check boxes and put
something like the folloning code behind it
Private Sub Label1_Click()
Me.CheckBox1 = True
Me.CheckBox2 = True

End Sub
this is just one quick idea. tested. it works.
 
Hi Zurn

If you use checkboxes from the Control toolbox

Sub test2()
For Each obj In ActiveSheet.OLEObjects
If TypeOf obj.Object Is MSForms.CheckBox Then
obj.Object.Value = True
End If
Next
End Sub
 
And if you used checkboxes from the Forms toolbar (on a worksheet):

ActiveSheet.CheckBoxes.Value = xlOn 'xlOff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top