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

Glossary Item Box

GetColFromID Method


See Also    DLL

Applies To

fpSpread control

Description

Returns the column number for the column with the specified identification string.

Syntax

C++

long CSpreadSheet::GetColFromID(LPCTSTR ColID);

Visual Basic

fpSpread1.GetColFromID(ByVal ColID As String) As Long

Parameters

The following parameter is available:

Parameter Description
ColID Column identification string

Remarks

Set the ColID property to define a unique identification string for a column. Once you define an ID for a column, you can use the GetColFromID method to retrieve the column number of the column with the specified ID. You can then assign the returned value to the Col property to specify the column with which to interact.

The GetColFromID method's ColID parameter is case-sensitive.

This method is called for the current sheet setting unless you first set the Sheet property to specify the sheet with which you want to work.

Tip: Because column numbers are based on the physical position of the column in the control, if you plan on moving columns, we strongly recommend you specify a column ID using the ColID property for a column, and call the GetColFromID method to reference a column.

Return Type

Long Integer

See Also

Providing Column IDs

ColID, Sheet properties

DLL Correspondence

SSGetColFromID function

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