Share via

Interactively using checkboxes in Word

Anonymous
2014-01-29T19:19:53+00:00

I have the following setup:

     Checkbox (Yes)                                           Checkbox (No)

A. Checkbox (...)

B. Checkbox (...)

C. Checkbox (...)

D. Checkbox (...)

I want to do the following:

  • Enable the Yes and No checkboxes always.
  • Disable the A-D checkboxes as a default. If the No checkbox is selected (checked), keep them disabled. If the Yes checkbox is selected (checked), enable them so that the user can check one of them.

Note: My document has a few of these "questions". So, it may be a bit more tricky than meets the eye.

Any suggestions?

Also - I am using Word on both the Mac and Windows. If necessary, I will use a Windows solution.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

9 answers

Sort by: Most helpful
  1. Anonymous
    2014-03-21T19:19:47+00:00

    Just as a note, the only type of checkbox in the document surface that will work on Mac Word 2011 is the type that is called "Legacy Forms" checkbox on Windows Word. Content Controls will only work on Windows Word.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-03-21T18:52:15+00:00

    OK - need to revisit this.

    Because... I am working with a 'template' document that users will be copying from a SharePoint site/location to a desired network/desktop location for modification and renaming according to the project being worked on.

    So, I cannot protect the entire document.

    Can I accomplish my goal with a user form within the document? Or should I be using Excel - in other words, is Excel the better solution? (With Visual Basic of course)

    I appreciate ANY suggestions. Especially because my contract is ending March 31st and I would like to resolve this. (I have been working on other items with respect to these 'templates'.)

    Kind regards,

    Mary

     P.S. I have been investigating how to create a userform within documents etc. and have not been able to find anything - perhaps I am not looking in the correct locations???

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2014-01-30T19:25:27+00:00

    I already added the code to the demo document.  To see it, just open the file, and open the VB Editor (ALT+F11) and open the "ThisDocument" module of the project. 

    See: http://gregmaxey.mvps.org/word_tip_pages/installing_employing_macros.html for some navigation tips in the VBE.

    You download the add-in using the "Templates" link at the bottom of the tips page.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2014-01-30T18:32:28+00:00

    Thanks very much, Greg.

    I am not certain how to add the code, though. Can you point me in the right direction - so I can add it?

    Also, I cannot figure out how to download the stuff from your site.

    Thanks again,

    Mary

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2014-01-29T22:02:38+00:00

    Mary,

    Interesting question and perfect timing.  I just recently published an add-in for creating mutually exclusive option buttons in Word.  It appears that it is really option buttons that you want.  You want the user to be able to select either yes or no but not both and if yes is check then you want them to check A, B, C or D  no?

    Using the following add-in you can create the two groups of option buttons.

    http://gregmaxey.mvps.org/word_tip_pages/mutually_exclusive_content_control_option_buttons.html

    Assuming that you tag the Yes\No group as 1 and the ABCD group as 2, then adding the following code in the document's ThisDocument module should give you the results you need:

      'Add these lines immediately after the Dim bRecheck as Boolean statement in the Sub Document_ContentControlOnChange procedure.

      If ActiveDocument.SelectContentControlsByTag("optGrp1_M_2").Item(1).Checked Then

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_1").Item(1).Checked = False

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_2").Item(1).Checked = False

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_3").Item(1).Checked = False

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_4").Item(1).Checked = False

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_1").Item(1).LockContents = True

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_2").Item(1).LockContents = True

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_3").Item(1).LockContents = True

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_4").Item(1).LockContents = True

      Else

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_1").Item(1).LockContents = False

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_2").Item(1).LockContents = False

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_3").Item(1).LockContents = False

        ActiveDocument.SelectContentControlsByTag("optGrp2_O_4").Item(1).LockContents = False

      End If

    I've put a working example in dropbox: https://dl.dropboxusercontent.com/u/64545773/Demo%20Option%20Buttons.docm

    Was this answer helpful?

    0 comments No comments