XLL+ Class Library (6.3)

CXllApp::WorkbookBeforeSaveEvent

Gets a reference to the WorkbookBeforeSave event

CXlWorkbookBeforeSaveEvent& WorkbookBeforeSaveEvent( );

Return Value

The function returns a reference to the application's WorkbookBeforeSave event, which is of type CXlWorkbookBeforeSaveEvent.

Remarks

The WorkbookBeforeSave event is raised when a workbook is about to be saved, and allows the event to be cancelled. All registered observers receive the event via the CXlEventObserver::Update method.

When observers are notified, an argument of type CXlBeforeSaveEventArgs is passed. Observers can cancel normal processing of the double-click by cancelling the event using CXlBeforeSaveEventArgs::SetCancel(false).

Registration

Observers can register for this event at any point in the life of the XLL. Registration can be done explicitly using Register, or automatically by creating an instance of CXlWorkbookBeforeSaveEventStaticObserver.

Requirements

Header: xllplus.h

See Also

CXllApp Class | CXllApp Methods | Events