run macro on exit of dropdown field

P

puba

If "yes" is selected from dropdown list, a macro on exit should
unhide the hidden text of the document.

The dropdown list is called "noyes", and the macro is called
"unhide".
The possible values of the dropdown list are only "yes" or "no", "no"
being the default.

The idea is to have a hidden paragraph appear if "yes" is answered.

Word 2003. The document is protected, to have access to the fields
created with the form toolbar. Does the protection prevents execution
of the macros?

I have read posts in this forum and tried to do it myself but without
success.


Thanks.
 
J

Jean-Guy Marcil

puba was telling us:
puba nous racontait que :
If "yes" is selected from dropdown list, a macro on exit should
unhide the hidden text of the document.

The dropdown list is called "noyes", and the macro is called
"unhide".
The possible values of the dropdown list are only "yes" or "no", "no"
being the default.

The idea is to have a hidden paragraph appear if "yes" is answered.

Word 2003. The document is protected, to have access to the fields
created with the form toolbar. Does the protection prevents execution
of the macros?

No, in fact. you need the protection to be on for the OnExit event to fire.

But, since you want to change part of the document that is protected, you
need to unprotect the document, unhide, then reprotect.

Why don't you post the "unhide" macro so that we can see the code and advise
you better.


--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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