-----Original Message-----
If you right click the check box, then select format control, now there
should be a
reference box where you can put in a cell reference somewhere off on the
sheet where
it is not visible like IV1, now you can do that for all check boxes and link
them together
in a range so the 25th would link IV25, then use the formula and you'll get
the count, or run a macro
like this, stolen from Dave Peterson (it will count both types of checkboxes
in case you are using the control toolbox)
Option Explicit
Sub testme01()
Dim curWks As Worksheet
Dim OleObj As OLEObject
Dim cbx As CheckBox
Dim cbxFromForms As Long
Dim cbxFormsChkd As Long
Dim cbxFromCtrl As Long
Dim cbxCtrlChkd As Long
Set curWks = ActiveSheet
cbxFromForms = 0
cbxFormsChkd = 0
cbxFromCtrl = 0
cbxCtrlChkd = 0
cbxFromForms = curWks.CheckBoxes.Count
For Each cbx In curWks.CheckBoxes
If cbx.Value = xlOn Then
cbxFormsChkd = cbxFormsChkd + 1
End If
Next cbx
For Each OleObj In curWks.OLEObjects
If TypeOf OleObj.Object Is MSForms.CheckBox Then
cbxFromCtrl = cbxFromCtrl + 1
If OleObj.Object.Value = True Then
cbxCtrlChkd = cbxCtrlChkd + 1
End If
End If
Next OleObj
MsgBox "From forms: " & cbxFromForms & "--" & _
cbxFormsChkd & " are checked" & vbLf & _
"From Control: " & cbxFromCtrl & "--" _
& cbxCtrlChkd & " are checked" & vbLf & _
"total: " & cbxFromForms + cbxFromCtrl & "--" _
& cbxFormsChkd + cbxCtrlChkd & " are checked"
End Sub
--
Regards,
Peo Sjoblom
.