Re: Using AUTOEXIT

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jay Freedman (jay.freedman_at_verizon.net)
Date: 11/04/04


Date: Thu, 4 Nov 2004 14:37:12 -0500

Hi Steve,

See http://word.mvps.org/FAQs/MacrosVBA/PseudoBeforeClose.htm.

-- 
Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org
Steve Wylie wrote:
> We're having some problems with our network at the moment.  One of the
> new "features" is that sometimes, when you close a document in Word,
> Word also exits completely as well.  I wanted to put an AutoExit macro
> on everyone's machines to ask "You are about to quit Word - is this
> okay?" [Yes/No] whenever Word tries to exit.  If they click Yes, Word
> will continue to exit; if they click No, Word will not exit and will
> just sit there with a blank "gray" screen.
>
> If Word macros were programmed in Javascript I could do something like
> ONEXIT="Return MsgBox()" and I could have Msgbox return FALSE (which
> would cancel the exit procedure) or TRUE (which would exit as normal).
>
> How do I do the same thing in VBA?  Is there a way to get the macro to
> cancel the exit procedure in its tracks?
>
> Steve Wylie


Relevant Pages

  • Re: Using AUTOEXIT
    ... Steve Wylie wrote: ... whenever Word tries to exit. ... > would cancel the exit procedure) or TRUE. ... Is there a way to get the macro to ...
    (microsoft.public.word.vba.general)
  • Using AUTOEXIT
    ... whenever Word tries to exit. ... would cancel the exit procedure) or TRUE. ... Is there a way to get the macro to ...
    (microsoft.public.word.vba.beginners)
  • Using AUTOEXIT
    ... whenever Word tries to exit. ... would cancel the exit procedure) or TRUE. ... Is there a way to get the macro to ...
    (microsoft.public.word.vba.general)
  • Re: calculate on exit/macro exit
    ... I can't see any good reason for an 'on exit' macro and 'calculate on exit' not to happily co-exist. ... In your original post you said "I also had an exit macro on one formfield to hide/unhide some text below the table depending upon ... Dim Toggle As Boolean ...
    (microsoft.public.word.vba.general)
  • Re: Adding Multiple Rows to a Table in a Word Form
    ... last row regardless how I exit the field. ... my End Sub statement to an Exit Sub statement. ... Whenever I TAB out of the last cell, ... exit" macro. ...
    (microsoft.public.word.vba.general)