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
 
Top