It looks like you're new here. If you want to get involved, click one of these buttons!
I need some help with Excel 5.0, here's my predicament. I am customising Excel with various macros and dialogs (all written in PERSONAL.XLS so that the custom code takes over from startup of Excel) but when exiting Excel I am having trouble duplicating Excel's behaviour. When you choose to exit the application by double clicking the system box in the top left of the window, Excel asks you whether you want to save any of the workbooks that are currently open and unsaved. The options you have are Yes, No and Cancel and selecting Cancel cancels the shutdown of Excel and returns you to the active workbook. Can I duplicate this behaviour with my own macro? The only thing I seem to be able to do when a user closes Excel with the system icon (choosing File-Exit is not a problem as I can substitute my own macro for the Exit menu item) is to put code in the Auto_Close() macro that Excel triggers when exiting. The problem though is that I can't see a way of stopping Excel from terminating from here if a user selects Cancel on my custom message box asking if they want to save an unsaved workbook. Any ideas? Can you trap the clicking of the system icon at all?
Thanks for any help.