XLL+ Class Library (7.0)


Called by the framework when a workbook is deactivated

virtual void OnWorkbookDeactivate(
   LPDISPATCH dispWorkbook



Pointer to dispatch interface of type Excel.Workbook.


This function is called whenever a workbook is deactivated, just before the corresponding OnWorkbookActivate event for the newly active workbook.

Note that it will only be called if event-sinking is switched on (using CXllApp::SetSinkEvents()).

You can override the method in your application class to react to the event. The default method does nothing.

Implementation note

You should only implement this function if you need access to Excel's COM interfaces. To handle events, you should usually use the event model. If you particularly need to call an add-in function to handle the event, use the much simpler mechanism provided by CXllApp::SetComEventHandler().


Header: xllplus.h

See Also

CXllApp Class | CXllApp Methods | CXllApp::OnWorkbookActivate() | CXllApp::OnSheetActivate() | CXllApp::OnSheetDeactivate()