xlEventRegister

Applies to: Excel 2013 | Office 2013 | Visual Studio

Used to register an event handler. Introduced in Excel 2010.

Excel12(xlEventRegister, LPXLOPER12 pxRes, 2, LPXLOPER12 pxProcedure, LPXLOPER12 pxEvent);

Parameters

pxProcedure (xltypeStr)

The name of the event handler function as it appears in the DLL code.

pxEvent (xltypeInt)

The event handled by the function designated in the pxProcedure parameter.

Starting in Excel 2010, Excel supports the following events:

Event Description
xleventCalculationEnded
Raised when Excel completes a calculation. You can free any resources allocated during the calculation after this event.
xleventCalculationCanceled
Raised when the user interrupts the calculation. The XLL should stop any asynchronous activities. The CalculationEnded event is raised immediately following this event.

Property value/Return value

If successful, pxRes (xltypeInt) has a value > 0. If unsuccessful, pxRes ==0.

See also

Asynchronous User-Defined Functions