UNREGISTER (Form 1)

Called from a macro sheet or DLL. This function reduces by one the use count of a function in a DLL or code resource. Each time REGISTER is called, the use count is increased by one. Each time UNREGISTER is called, the use count is decreased by one. When the use count of all the functions in a DLL reaches zero, the DLL is unloaded from memory.

If successful, returns TRUE (xltypeBool).

Syntax

From a macro sheet:

UNREGISTER(register_id)

From a DLL:

Excel4(xlfUnregister, LPXLOPER pxRes, 1, LPXLOPER pxRegisterId);

register_id (xltypeNum)

The registered ID of the function to unregister, which you get from calling REGISTER or REGISTER.ID.

Remarks

If you specified the function_text argument to REGISTER, you need to explicitly delete the name by calling SET.NAME and omitting the second argument, so that the function will no longer appear in the Function Wizard.

Example from a Macro Sheet

The following example registers the CalcCircum function in CIRCUM.DLL, calls the function using the defined name for cell B1, and then unregisters the function.

Example

See the code for the fExit function in GENERIC.C in the FRAMEWRK directory.

Related Functions

CALL, REGISTER, REGISTER.ID, UNREGISTER (Form 2)