Check box counting
Put this code in the sheet code module:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
For i = 1 To 5
If Me.OLEObjects("CheckBox" & i).Object = "True" Then
x = x + 1
End If
Next
Range("M10") = x
End Sub
When you copy the sheet the code goes with it.
"jtfalk" wrote in message
...
Good day,
I have a sheet with multiple check boxes. I would like checkbox1-checkbox5
to sum in cell M10.
For example if checkbox2 and checkbox4 are checked then the value in cell
M10 = 2
Also I am going to be copying this worksheet over and over so it hase to
be
worksheet specific.
Any help would be appreciated
|