Auto Populate Check Boxes when one check box is checked in Word 2010

Posted on 2012-09-13
Last Modified: 2012-09-17
Hey all,

I have a large document that uses Bookmarks and REF to auto populate text fields in Word 2010.  I am wondering if word can also auto populate check boxes so that when I check a box on the first page, all the check boxes with the same bookmark will also be checked.  

It would be great if it didn't require a macro to make this happen...

Any thoughts?

Thank you,
Question by:AFSTech
    LVL 22

    Accepted Solution

    I don't know if you would be able to identify a checkbox by which bookmark it falls under, but you can put code in your first checkbox which would change the rest. In design mode, right-click your first page checkbox and select View Code. Enter this code:

     Private Sub CheckBox1_Click()
      If Me.CheckBox1.Value = True Then
         Me.CheckBox2.Value = True
         Me.CheckBox3.Value = True
         Me.CheckBox4.Value = True
         Me.CheckBox5.Value = True
         Me.CheckBox2.Value = False
         Me.CheckBox3.Value = False
         Me.CheckBox4.Value = False
         Me.CheckBox5.Value = False
      End If
    End Sub 

    Open in new window

    Change the Checkbox names to match yours (If your first page checkbox is not CheckBox1, change both Private Sub Checkbox1_Click() and If me.CheckBox1 to match)


    Author Comment

    This all seems great but I do not see the View Code when I right click on the check box.  I am in design mode but I can't see that anywhere.  I tried to hit ALT F9 and it doesnt show that way either.  I am using Word 2010, possibly it's moved somewhere?


    Author Comment

    Ah nevermind they have to be Active X CheckBoxes as opposed to the Legacy Form Check Boxes.  

    Thank you for the help and the code above I am going to have to replace all the checkboxes on the form so im off to work.  

    LVL 22

    Expert Comment

    I was just looking into how to program Legacy checkboxes. Before you make any changes, you might want to review this article:

    Hope I saved you some time!


    Author Comment

    Thanks again, that is the solution I will go with I think, changing the form is so time consuming because it is a tightly formatted document and the sizes of the form checkboxes and the active x checkboxes are so different.  

    I was trying to stay away from using macros in the document but I think that I will just go ahead and accept that the document needs macros and use them for a couple other functions as well.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Nice table. Huge mess. Maybe this was something you created way back before you figured out tabs or a document you received from someone else. Either way, using the spacebar to separate the columns resulted in a mess. Trying to convert text to t…
    Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
    This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
    The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now