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

Glossary Item Box

SetCustomName Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets a custom name and its value.

Syntax

C++

BOOL CSpreadSheet::SetCustomName (LPCTSTR Name, LPCTSTR Value);

Visual Basic

fpSpread.SetCustomName(ByVal Name As String, ByVal Value As String) As Boolean

Parameters

The following parameters are available:

Parameter Description
Name Custom name
Value Value represented by custom name

Remarks

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.

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

Use the SetCustomName method 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 Name 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 Value parameter can represent a constant, a cell, a range of cells, or a computed value.

Return Type

True if successful; otherwise, False. 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

GetCustomName, QueryCustomName methods

DLL Correspondence

SSSetCustomName function

Copyright © GrapeCity, inc. All rights reserved.