Spread 8.0 Documentation
CustomFunction, ScriptCustomFunction Events
Support Options
ActiveX Reference > ActiveX Events > CustomFunction, ScriptCustomFunction Events

Glossary Item Box

CustomFunction, ScriptCustomFunction Events


See Also    Example

Applies To

fpSpread control

Description

Occurs when a custom function is evaluated in a cell's formula.

Syntax

C++

afx_msg void OnCustomFunctionfpSpread(UINT, int, CWnd*, LPVOID);

Visual Basic

Sub fpSpread_CustomFunction(ByVal FunctionName As String, ByVal ParameterCnt As Integer, ByVal Col As Long, ByVal Row As Long, Status AsFPSpreadADO.ValueStatusConstants)

Note: The ScriptCustomFunction event uses the same syntax except event parameters that are not passed "ByVal" are declared as variants. For more information on Script events, see Scripting Environment Usage.

Parameters

The following parameters are available:

Parameter Description
FunctionName Name of function being evaluated
ParameterCnt Number of parameters passed to function
Col Column number of cell that contains function
Row Row number of cell that contains function
Status Return value from function evaluation
Can be one of the following:
Value Constant
0 ValueStatusOK
1 ValueStatusError
2 ValueStatusEmpty

Remarks

Use the SheetSendingEvent property if you want to return the sheet for which this event occured.

Note: This event will occur if you use the fpSpread control in a scripting environment (for example, Microsoft's Visual InterDev or Internet Explorer) or a non-scripting environment. However, if you want to use the fpSpread control in a scripting environment and you want to change any parameter that is not passed "ByVal", you must set the ScriptEnhanced property to True and use the ScriptCustomFunction event. ScriptCustomFunction event parameters that are not passed "ByVal" are declared as variants.

See Also

Creating and Using Custom Functions

Formula, ScriptEnhanced, SheetSendingEvent properties

AddCustomFunction, CFGetDoubleParam, CFGetLongParam, CFGetParamInfo, CFGetStringParam, CFSetResult methods

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.