Macro on exit not running

R

Robert

I have a form with formfields which have macros which run
on exit. When the user is done there is a toolbar macro
that cleans up. There is a problem if the user doesn't
exit the formfield before going to the toolbar macro-the
formfield macro doesn't run. I was trying to add a line to
the toolbar cleanup macro that selects a different form
field so the formfield macro will run, but macros can't be
run when the document is protected. Is there a way to make
sure the user exits the form field after they make a
change? Thanks.
 
J

Jay Freedman

Hi, Robert,

No, there isn't anything of the sort you're thinking of. Besides,
programmatically jumping to another form field won't trigger the exit macro.

If the cleanup macro can determine that there will be a problem (you didn't
say what sort of problem it is, or how it might be detectable, so I can't be
explicit here), it can call the exit macro before doing the rest of its
work.
 
R

Robert

When form field textbox "B" text is deleted, the exit
macro deletes the text from form field textbox "A" which
occurs above "B". I was trying to make the cleanup macro
tab out of "B" so the macro on exit would run. I'll try
your suggestion to test for the condition in the cleanup
macro. Thanks.
 
C

Charles Kenyon

Baseball bat?

You could start your toolbar macro by running the on-exit macro?

I have the same problem just with calculate on exit.

If you make it basic enough and if the results matter to the user, you can
train them to press the tab key after they do anything in a field. The
penalty is self-enforcing, Word ignores what they just did.
--

Charles Kenyon

See the MVP FAQ: <URL: 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.
 

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