My goal is to count the number of Check Boxes on each worksheet and the total number of checked checkboxes on each worksheet.
I am probably making this too complicated and can use the help.
Thanks
![]()
Sub Checkedboxes() Dim sCtrl As Shape Dim lCount As Long Dim checked As Long Dim myshape As Shape Dim boxes As Long For Each sCtrl In Sheet1.Shapes If sCtrl.Type = msoFormControl Then If sCtrl.FormControlType = xlCheckBox Then If sCtrl.TopLeftCell = vbNullString Then lCount = lCount + 1 If myshape.ControlFormat.Value = xlOn Then boxes = boxes + 1 End If End If End If End If Next sCtrl ThisWorkbook.Sheets("Sheet1").Cells(18, 3) = lCount ThisWorkbook.Sheets("Sheet1").Cells(20, 3) = boxes End Sub











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks