Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Problem With Auto_Close and QUIT() Function - XLM4 Macros

I have a worksheet that invokes an XLM4 macro function when the
Auto_Close event occurs. This event is invoked whenever the worksheet is
closed or when the Excel application is terminated.

On my macro sheet, the called subroutine for Auto_Close does some
cleanup work (e.g.: restoring toolbar settings to previous states) and
then calls the QUIT() function to terminate Excel. Excel takes care of
prompting the user for worksheet saves.

This works as expected for worksheet-invoked close on Excel on the Mac
and Windows platforms.

It works as expected for Excel-invoked close on the Mac. However, on the
Windows platform suing the same code, the execution of the QUIT()
function in this instance causes a macro error.

I've experimented with all variants of the ERROR(FALSE) function.
Unfortunately, to make it work for Excel application close on Windows,
it causes the worksheet window close operation to bypass the prompt for
save.

Has anyone else seen this or know a way around it ?

TIA.

Art
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove all macros and objects in Excel, Save and Quit [email protected] Excel Programming 0 June 2nd 06 12:38 PM
Remove all macros and objects in Excel, Save and Quit [email protected] Excel Discussion (Misc queries) 0 June 2nd 06 12:24 PM
vba advice how 2get a input box to quit by entering the word quit+ 4 a msgbox to disp RELWOD85[_4_] Excel Programming 3 August 1st 05 07:11 PM
Another Quit problem Paul van Kan Excel Programming 4 December 30th 04 06:41 PM
unable to close macro using auto_close or application.quit gloria Excel Programming 1 January 14th 04 07:50 AM


All times are GMT +1. The time now is 07:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"