Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 03-09-2014, 02:43 PM
macropod's Avatar
macropod macropod is offline how to show total of check boxes checked Windows 7 32bit how to show total of check boxes checked Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,525
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
 

Tags
check box percentage



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to show total of check boxes checked Repeat Spell check in a doc that has already been checked mawigfie Word 1 08-22-2012 01:16 PM
Word2010 check boxes and plain text content control boxes in same table fcsungard Word 5 06-01-2012 01:16 AM
Create makro that counts the number of checked tick boxes in a survey johannapaj Word VBA 0 09-05-2011 01:51 AM
how to show total of check boxes checked I Checked "Don't show again" and now I want it back. WaltR Word 1 02-03-2011 03:20 AM
Problem with Developer Form -- Check Boxes and Text Boxes PCC Word 1 05-16-2009 05:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft