Checking and Unchecking CheckBoxes in code

A

Ayo

I have 7 checkbox and 2 option buttons. One of the option buttons unchecks
all the checkboxes and the other one checks all the options buttons. In Excel
2003 I was able to use somthing like this to do that:
For Each ctl In InputForm2.Controls
If TypeName(ctl) = "CheckBox" Then
If ctl.Value = True Then
ctl.Value = False
ElseIf ctl.Value = False Then
ctl.Value = True
End If
End If
Next ctl

This don't work in Excel 2007. Any ideas
Thanks
 

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

Top