Re: counting checkboxes
- From: "Rick Rothstein \(MVP - VB\)" <rick.newsNO.SPAM@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Feb 2008 13:37:42 -0500
If you name your CheckBox'es so that they start with the same text ("CheckBox" for this example) and end in numbers of the same length (that is, use leading zeroes if there are more than 9 CheckBox'es; that is, the first 9 names should end with 01, 02, 03, etc. instead of just 1, 2, 3, etc.), then this code will count the number of with check marks in them...
Dim X As Long
Dim Count As Long
Dim C As Control
For Each C In Me.Controls
If C.Name Like "CheckBox##" Then
If C.Value = True Then Count = Count + 1
End If
Next
Rick
"Manny" <Manny@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:1B7FDDB6-6FE6-464C-9985-8E7735D7B515@xxxxxxxxxxxxxxxx
Is it possible to count up the "true" values of a series of checkboxes? If
so, what is the formula?
--
Thanks,
Manny
.
- Prev by Date: Re: Efficiency re: Module Sequence in a Project feb08
- Next by Date: new custom menu
- Previous by thread: RE: counting checkboxes
- Next by thread: Worksheet_Change and Copy
- Index(es):