Checkbox Macro on Exit

G

Guest

I've created a form template with "x" boxes. I'd like for
the "xed" box to become red in color when the user clicks
on it. I've tried assigning a macro to do this, but the
message I get upon use is that the macro cannot be
performed because the document is protected (which it
would be, being a form!)

Anybody have an idea for a work-around? (My experience w/
Visual Basic is minimal, but I think I can plug in a
macro.)

Thanks! Jenny
 
C

Charles Kenyon

You need to (within your macro) unprotect the document, make your change,
and then reprotect the document without resetting data.
 
J

Joost Verdaasdonk

-----Original Message-----
You need to (within your macro) unprotect the document, make your change,
and then reprotect the document without resetting data.


--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ------ ---
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.




.

Hi Jenny,

Because you're knowledge is minimal you need something
like this:

With ActiveDocument

If .ProtectionType <> wdNoProtection
Then .Unprotect Password:="pswrd"

'You're code

.Protect Password:="pswrd", NoReset:=True, Type:=
_
wdAllowOnlyFormFields

End With

Have fun,
Joost Verdaasdonk
 

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