XLL+ Class Library (6.3)

CXlWorkbookBeforeCloseEvent Class

An event which is raised when a workbook is about to be closed, and allows the event to be cancelled.

class CXlWorkbookBeforeCloseEvent : public CXlEvent

Overview

The event occurs when a workbook is about to be closed, and allows the event to be cancelled.

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 CXlWorkbookBeforeCloseEventStaticObserver.

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

Requirements

Header: xlpevents.h

See Also

CXlWorkbookBeforeCloseEvent Methods | xlpevents.h | CXllApp::WorkbookBeforeCloseEvent | Events | CXlBeforeCloseEventArgs | CXlWorkbookBeforeCloseEventStaticObserver