![]() |
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 |
All times are GMT +1. The time now is 06:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com