Spread 8.0 Documentation
SSGetCustomName, SSSetCustomName Functions
Support Options
DLL Reference > DLL Functions > SSGetCustomName, SSSetCustomName Functions

Glossary Item Box

SSGetCustomName, SSSetCustomName Functions


See Also    ActiveX    Example

Applies To

fpSpread DLL control

Description

Set or return a custom name and its value.

Syntax

C

int SSGetCustomName(HWND hWnd, LPCTSTR lpszName, LPTSTR lpszValue, int nValueLen);

int SSSetCustomName(HWND hWnd, LPCTSTR lpszName, LPCTSTR lpszValue);

C++

int TSpread::GetCustomName(LPCTSTR lpszName, LPTSTR lpszValue, int nValueLen);

BOOL TSpread::SetCustomName(LPCTSTR lpszName, LPCTSTR lpszValue);

Parameters

The SSGetCustomName function has the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
lpszName Custom name
lpszValue Value represented by custom name
nValueLen Maximum length of the buffer that will contain the value

The SSSetCustomName function has the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
lpszName Custom name
lpszValue Value represented by custom name

Remarks

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

You can define custom names to represent information in the control. For example, a custom name can represent a cell, a cell range, or a computed value.

Use the SSSetCustomName function to define a custom name that can then be used in formulas. You can redefine the custom name by assigning a new value to the name, or you can undefine it by assigning the NULL value to it. You cannot undefine a name if it is used in a expression.

The lpszName string can contain up to 255 characters and can include letters, numbers, or underscores. The first character must be a letter or an underscore. Valid ASCII characters for the custom name are 0-127.

The lpszValue parameter can represent a constant, a cell, a range of cells, or a computed value.

Return Value

SSGetCustomName: Length of value of specified custom name.
SSSetCustomName: TRUE if the function completes successfully; FALSE otherwise. A FALSE value is returned if you try to set the value to an invalid expression or if you try to undefine an existing custom name used in an expression.

See Also

SSGetCustomNameLen, SSQueryCustomName, SSQueryCustomNameLen function

ActiveX Correspondence

SSGetCustomName: GetCustomName method

SSSetCustomName: SetCustomName method

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