Hi,
Is there any way to either control or disable the above message which appears you close a workbook?
I have tried using the displayalerts and enableevents method in the Before_Close workbook event, but I can't seem to get it working as I would like.
Basically, I want the user to be able to click either my custom Exit button, or the Excel close button in the top right corner of the window and application to close down the program.
Directly after the user clicks, I have code which restores a number of command bars etc. This is fine, except when the user hits the cancel button on the Excel Save Changes box. It continues to run the code which restores the command bars, but does not shut down the program.
Am I able to detect whether the cancel button has been clicked, and then maybe tell the program to skip the restore code?
Thanks
Is there any way to either control or disable the above message which appears you close a workbook?
I have tried using the displayalerts and enableevents method in the Before_Close workbook event, but I can't seem to get it working as I would like.
Basically, I want the user to be able to click either my custom Exit button, or the Excel close button in the top right corner of the window and application to close down the program.
Directly after the user clicks, I have code which restores a number of command bars etc. This is fine, except when the user hits the cancel button on the Excel Save Changes box. It continues to run the code which restores the command bars, but does not shut down the program.
Am I able to detect whether the cancel button has been clicked, and then maybe tell the program to skip the restore code?
Thanks