XLL+ Class Library

IExcelEmulator.HandleExcel4

Respond to a call to the Excel SDK

[VB]
Public Function HandleExcel4( _
   ByVal xlfn As Long, _
   ByVal arguments As Variant(), _
   ByRef resultCode As Long, _
   ByRef resultValue As Variant _
) As Boolean 

Parameters

xlfn

The numeric ID of a built-in Excel function.

arguments

The arguments to the Excel built-in function, as an array of Variants.

resultCode

If the function is handled, then resultCode must be set to the simulated return value from Excel4(). This should be one of the values listed below.

resultValue

If the function is handled, and is expected to return a value, then resultValue should be set to contain that value.

Return value

If the SDK function is handled, this method should return TRUE. If the function is not handled, then it should return FALSE. When the XllDriver intercepts a call to the Excel SDK, it tries each emulator in turn, until one of them returns TRUE.

Remarks

If you are analysing an XLL, you may find it useful to call XllDriver.GetFunctionName to convert a numeric function ID to text.

Values for resultCode

NameValueDescription
xlretSuccess0The function returned successfully and (if required) the value of resultValue was set.
xlretAbort1The operation was aborted by the user
xlretInvXlfn2The function is not valid at this time
xlretInvCount4The number of arguments was invalid
xlretInvXloper8One of the arguments was invalid
xlretStackOvfl16Stack overflow
xlretFailed32The operation failed
xlretUncalced64The function could not be calculated at this time, and will be attempted again later

Requirements

Library: pslxld01.dll

See Also

IExcelEmulator Interface | IExcelEmulator Methods