Hello,
I'm using MS Excel 2003 and I have a sheet with altogether 6 ActiveX checkboxes. I want to have a 7th that (un-)checks them all. I can do that for form controls in VBA but not for ActiveX. Here's my code for the form controls:
Sub CheckAll()
Dim lngIndex As Long
Dim lngState As Long
lngState = ActiveSheet.Shapes("Check Box 7").ControlFormat.Value
For lngIndex = 1 To 6
With ActiveSheet
With .Shapes("Check Box " & lngIndex)
.ControlFormat.Value = lngState
End With
End With
Next
End Sub
Unfortunately, I have to stick with ActiveX controls because I need them to trigger a worksheet change event.
Thanks.
Stefan
Bookmarks