View Single Post
 
Old 03-09-2014, 02:43 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your checkboxes are indeed of the Active-X type. To get the desired tally you could use a macro like:
Code:
Sub CountChecks()
Dim iShp As InlineShape, i As Long, j As Long, StrPct As String
For Each iShp In ActiveDocument.InlineShapes
  If Not iShp.OLEFormat Is Nothing Then
    If iShp.OLEFormat.ClassType = "Forms.CheckBox.1" Then
      i = i + 1
      If iShp.OLEFormat.Object.Value = True Then j = j + 1
    End If
  End If
Next
If i <> 0 Then
  StrPct = " (i.e. " & Format(j / i, "0.0%") & ")"
End If
MsgBox j & " of " & i & " checkboxes" & StrPct & " are checked."
End Sub
For macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote