Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 03-31-2019, 02:57 AM
gmayor's Avatar
gmayor gmayor is offline Add / Sum checked Checkboxes labelled 1, 2, 3, etc. in Word Table - Need Macro? Windows 10 Add / Sum checked Checkboxes labelled 1, 2, 3, etc. in Word Table - Need Macro? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Create new documents from the template. (File > New) These will be cleared of selections. Select as many or as few check boxes as you wish then click the calculate button. You can make changes and recalculate in that document.

I have modified the attachment slightly. Just re-download and copy the ModMain module to your template (drag and drop with both open) and copy the contents of the ThisDocument module to the matching module in your template.

The Button is an ActiveX button from the Developer Tab, Controls Group and it simply runs the CalculateTotals macro which counts up the various check box results and writes them to the appropriate results content controls and then totals the selections and sorts the results.

It all works on the basis that your check box content controls all have the same titles - in this Case 1,2,3,4,5,6,7,8,9 as appropriate and that the results have corresponding titles Calc1 to 9. There is also a Total content control.

You may find http://www.gmayor.com/insert_content_control_addin.htm useful to edit the controls and add titles as appropriate in your template.
Attached Files
File Type: dotm CheckboxPreferencesExample.dotm (50.5 KB, 41 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 

Tags
checkboxes, macro, sum



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Macro to select Checkbox after two boxes are checked in a series of checkboxes rsaini Word VBA 0 01-16-2018 11:57 AM
Add / Sum checked Checkboxes labelled 1, 2, 3, etc. in Word Table - Need Macro? Assigning values to formfield checkboxes in a table mammiano Word Tables 13 01-12-2015 06:27 AM
Pivot Table Question- Can the table display in the order the boxes were checked/selected? blackjack Excel 0 09-13-2014 08:57 PM
Checkboxes are unchecked in Listbox that were checked off before.How can I stop this? Rochelle711 Excel Programming 0 06-22-2014 06:16 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:27 PM.


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