Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2006

Tip: Looking for answers? Try searching our database.

Stopping AutoClose macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stephen English - 24 May 2006 03:44 GMT
I have put code in the AutoClose macro to check if a bookmark exists.   If it
doesn't I throw up an error messagebox.   However, when they OK the message
box, I want to cancel the autoclose so the document stays open.   Exit Sub
doesn't work.

Any ideas please?
Stephen
Jezebel - 24 May 2006 04:07 GMT
In place of AutoClose, you want the DocumentBeforeClose event. That has a
Cancel argument which, if set TRUE, prevents the document closing.

Read Help on 'Trapping Word events' for how to set it up.

>I have put code in the AutoClose macro to check if a bookmark exists.   If
>it
[quoted text clipped - 5 lines]
> Any ideas please?
> Stephen
Stephen English - 24 May 2006 06:00 GMT
Thank you for such a speedy response.   All working now.
Cheers
Stephen

> In place of AutoClose, you want the DocumentBeforeClose event. That has a
> Cancel argument which, if set TRUE, prevents the document closing.
[quoted text clipped - 10 lines]
> > Any ideas please?
> > Stephen
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.