When I close Excel and click "Yes to All" it does not close until I click the top X again. This is an Excel bug caused by using Workbook_Deactivate in multiple workbooks. Does anyone have VBA API code to trap this event and allow me to close all workbooks.
Please note I and others have made extensive efforts to solve this problem using the Workbook_BeforeClose and Workbook_Deactivate events. It is almost certainly not possible to do it using these events without introducing some other unwanted behaviour.
It may be possible using the Windows API, by doing something along the lines of getting the handle of the close dialog box window, then getting the "YEs to Alll" button ID.