none
Word VBA RRS feed

  • Question

  • I have created a checklist in Word using Option Buttons. The checklist has 2 sections - the 1st to be completed by the user and the 2nd to be completed by the authorizer. When the 'user' completes and saves the document (macro-enabled), I need word to protect that section and also lock the Option Buttons. The same needs to happen when the authorizer saves the document (macro-enabled).

    I have tried the Protect Document function but it does not lock the Option Buttons. Please help.

    Sunday, May 4, 2014 4:14 PM

Answers

  • What are these 'Option Buttons' (e.g. formfield checkboxes, content control checkboxes, ActiveX checkboxes, checkboxes or radio buttons on a userform)?

    If you use content control checkboxes, you can apply editing restrictions such that users (and authorizers) can use some, but only the authorizers can use others. Locking the checkboxes after updating can be done via a Document_ContentControlOnExit macro, as each checkbox is exited, or when the document is saved, via a DocumentBeforeSave macro. However, you will need to consider how you will ensure they aren't locked at the wrong time or with the wrong values, or what happens if a user skips over a checkbox (either because they forgot it or they decided to leave it in the default state). My preference, where a decision is required, is to use a dropdown with Yes/No choices and neither of these selected as the default.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    • Marked as answer by Marvin_Guo Monday, May 12, 2014 9:30 AM
    Sunday, May 4, 2014 11:38 PM