Counting Checkboxes

S

Steven

I am looking for a way to count the number of checkboxes with a check in them. Can anyone help

Thanks for your time..
Steven
 
R

Ron de Bruin

If they are in a userform then try this

Dim ctl As Control
Dim A As Long
A = 0
For Each ctl In UserForm1.Controls
If TypeOf ctl Is MSForms.CheckBox Then
If ctl.Value = True Then A = A + 1
End If
Next
MsgBox A
 
S

Steven

I know. I apologize. When I refreshed to check and see if i recieved any responses i didn't see it posted. I was in a bit of a hurry when I psted it, I thought maybe i forgot to submit.
 
Top