Spread 8.0 Documentation
AddCustomFunction Method
Support Options
ActiveX Reference > ActiveX Methods > AddCustomFunction Method

Glossary Item Box

AddCustomFunction Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Defines a custom function, which can be used in a formula definition.

Syntax

C++

BOOL CSpreadSheet::AddCustomFunction(LPCTSTR FunctionName, short ParameterCnt);

Visual Basic

fpSpread.AddCustomFunction(ByVal FunctionName As String, ByVal ParameterCnt As Integer) As Boolean

Parameters

The following parameters are available:

Parameter Description
FunctionName Name of the custom function
ParameterCnt Number of parameters the function expects
(Set this value to –1 if any number of parameters are allowed.)

Remarks

An application must respond to the CustomFunction event to implement the custom function.

This method is applied to the entire workbook, including all sheets in the control.

Spread Designer

The Custom Name tab in the Calculation dialog box.

Parameter Items on Custom Name tab
FunctionName Name drop-down combo box
ParameterCnt Value box

Return Type

True if successful; otherwise, False.

See Also

Creating and Using Custom Functions

CustomFunction event

AddCustomFunctionExt, CFGetCellParam, CFGetDoubleParam, CFGetDoubleParamExt, CFGetLongParam, CFGetParamInfo, CFGetRangeParam, CFGetStringParam, CFSetResult, EnumCustomFunction, GetCustomFunction, RemoveCustomFunction methods

DLL Correspondence

SSAddCustomFunction function

Copyright © GrapeCity, inc. All rights reserved.