CALL (Form 2)

Called from a macro sheet or worksheet. If the function is not yet registered, it is registered when called, and then the specified procedure in the DLL or code resource is called. If the function is already registered, it is called without reregistering.

Returns the return value from the function that was called.

Syntax

CALL(module_text,procedure,type_text,argument1, ...)

module_text (xltypeStr)

The name of the DLL containing the function.

procedure (xltypeStr or xltypeNum)

If a string, the name of the function to call. If a number, the ordinal export number of the code function to call. For clarity and robustness, always use the string form.

type_text (xltypeStr)

An optional string specifying the types of all the arguments to the function, and the type of the return value of the function. You can omit this argument for a stand-alone DLL (XLL) that provides the xlAutoRegister function. For more information about data types, see the "Remarks" section under "REGISTER (Form 1)" on page 220.

argument1, ...

Zero or more arguments to the function. These arguments are optional.

Remarks

This form of call is equivalent to using Call (Form 1), as follows:

=CALL(REGISTER.ID(module_text, procedure, type_text), argument1, ...)

Example

The following example registers and calls the CalcCircum function in CIRCUM.DLL.

Related Functions

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