I have a workbook where I want to be sure user is really sure he want to quit without saving changes. Is there a way to prompt a message if user click no on XL message “Do you want to save the changes?” on leaving?
I know there is a BeforeSave event but this one is triggered BEFORE the XL prompt and in my case, I would like AFTER.
Example:
- User click the X for leaving the Workbook.
- XL prompt user for saving changes.
- User click NO.
- I would like to prompt again something like "ARE YOU SURE?"
Thank you.
the Workbook_Deactivate event fires after the save dialog is dismissed.
You will need to show a modal MsgBox and handle the responce, issue Thisworkbook.Save if required
Has the side effect that if more than one book is open, switching between them can fire the meesage too