Workbook BeforeSave Cancel

Add-in Express™ Support Service
That's what is more important than anything else

Workbook BeforeSave Cancel
Eric Smith

Posts: 6
Joined: 2007-07-25
I've created an Excel add-in and hooked up an event handler for the WorkbookBeforeSave event:

private void adxExcelEvents_WorkbookBeforeSave(object sender, AddinExpress.MSO.ADXHostBeforeSaveEventArgs e)
			e.Cancel = true;

When I run Excel and hit Ctrl+S, the event handler is called, but the e.Cancel = true seems to have no effect. The Save As dialog appears when returning from the event handler. Shouldn't canceling prevent the Save As dialog from appearing?
Posted 27 Aug, 2007 19:20:06 Top
Sergey Grischenko

Add-in Express team

Posts: 7228
Joined: 2004-07-05
Hi Eric.

I have just tested the code. It works fine. The SaveAs dialog doesn't appear. What version of Add-in Express do you use?

P.S. We always do our best to answer your forum requests as soon as possible. However, we apply the rule "first in first out" with Premium Support Service subscribers taking priority. Please understand it may take us some time to do research on the issue. Please be assured we will let you know as soon as the best possible solution is found.
Posted 28 Aug, 2007 15:28:18 Top
Eric Smith

Posts: 6
Joined: 2007-07-25
Hi Sergey,

I just tried again and it seems to be working for me too, now. I think that there was another add-in loaded that was maybe impacting the behavior somehow. Thanks for checking.
Posted 28 Aug, 2007 16:32:12 Top