I am handling an OnWorkbookBeforeClose event and need to prompt the user to save changes. There is plenty on how to disable the Save Changes Dialog, but nothing on how to show it...
(I need to tidy some things up. If do so then get Excel to put this box up and the user presses cancel, there is no event that the user has not saved the workbook and it is still open and active).
Since there are no DialogButtons for a standard Dialog for SaveDontSaveCancel (closest is YesNoCancel) is there any way of showing this Save Changes Dialog?
(To be clear I am not interested in the Save or SaveAs dialogs, only the 'Save Changes' dialog which prompts: 'Do you want to save the changes to Book1.xks? and has 3 buttons: Save, Don't Save, Cancel)
The XlBuiltInDialog.xlDialogSaveWorkbook simply shows the Save dialog prompting for a file name (implying the user has already chosen 'Save').
Alternatively if there is an event raised after a workbook is closed then this would allow me to do what I need.
I would rather present the user with the correct Excel Dialog so don't really want to roll my own.
Save
,Don't Save
, andCancel
. I don't remember a dialog box which showsSave, Save As, Cancel
in one box? – Siddharth Rout