Checkboxes and Protected Document

B

Budget Programmer

Hello,

I have a Word 2000 template that gets copied for every project. The users
edit a lot of the document, even deleting entire sections. There's a macro
that gets executed which does a lot of things based on the status of a
checkbox. This work great.

The problem is that it's a lot of steps for users to update the checkboxes.
The users click on a checkbox, it presents a pop-up dialog box where the user
has to enter "Checked" or "Unchecked" and then click OK.

I've noticed that when I protect the document (View / Forms / Padlock =
Protected), it updates the TOC, which is fine, and the checkboxes behave
better. One click turns them off or on. That part is great. The problem is
that when the document is in that Protected mode, the Macro's won't work.
They're grayed out.

Question: How to I make the checkboxes so that they're one-click to Check /
Uncheck, and still allow major edits to the document and allow the Macro to
execute?
 
P

PJY

A macro button will work in a protected form, however, a macro button needs
to be placed in the protected form so you can run it. I've bypassed this
problem by placing the macro button in the form with hidden text.
 
B

Budget Programmer

Thanks for the suggestion, but that won't work with the need for the users to
be able to edit this document freely. Sometimes whole sections get delted,
added, etc.
Nice work around for the Macro issue though.
 
S

Suzanne S. Barnhill

Sounds to me like you need a UserForm to display your checkbox and then run
the macros based on its state.
 
G

Graham Mayor

I'm confused. Is this supposed to be a protected document - in which case
the users will not be able to edit the document freely - or an unprotected
document?

If the former then use a checkbox form field and run your macro on exit from
it.

If ActiveDocument.FormFields("Check1").CheckBox.Value = True Then
'do your stuff
End If

If the latter then you could use a macrobutton field
http://www.gmayor.com/Macrobutton.htm to check and uncheck the box and run
your code, but a macrobutton field requires a double click by default (maybe
not in Word 2000).

Or simply provide the macros required by the document either from a userform
or from a custom toolbar depending on the nature of the macros and the
document.

I would suggest also that users create new documents from a template and
that the required text(s) be inserted based on the user form rather than
some ad hoc editing of some pre-written texts which may or may not be
required.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
B

Budget Programmer

Hello,
Sorry you're confused. Here's the issue. The document needs to be highly
editable. The user will add text, delete sections, etc. There are a few
hundered checkboxes throughout the document. The user marks various
checkboxes as checked or unchecked. I do not need the checkbox to trigger
anything at all.
When all the editing is done, the user runs the single macro for the
document. That macro evaluates most of the checkboxes, and based on a series
of conditions, will copy values from Word and update a few Excel
spreadsheets. The Macro is working fine.

What I need is a way to make each checkbox behave in a manner similar to
when the entire document is in "protected" mode, i.e. that a single click
will toggle between checked and unchecked. However, the document itself
needs to be unprotected, since it's highly editable, and the Macro needs to
run on a regular basis as the document goes through reviews.
Summary: I need the document editable (I assume that means unprotected) but
I'd like the checkboxes easy to toggle between Checked and Unchecked.
Thanks for your help
 
G

Graham Mayor

If you want maximum editing capability that means a form that is not
protected. You can use macrobutton fields to toggle the check boxes, but it
will need a double click. In addition to my page, see
http://gregmaxey.mvps.org/Add_Toggle_Objects.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top