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

Glossary Item Box

MoveColRange Method


See Also    DLL    Example

Applies To

fpSpread control

Description

Moves the specified range of columns to the specified destination.

Syntax

C++

void CSpreadSheet::MoveColRange(long lCol, long lCol2, long lColDest);

Visual Basic

fpSpread1.MoveColRange(ByVal lCol As Long, ByVal lCol2 As Long, ByVal lColDest As Long)

Parameters

The following parameters are available:

Parameter Description
lCol Column number of first column in range to move
lCol2 Column number of last column in range to move
lColDest Destination column at which to paste the range of columns

Remarks

Use the MoveColRange method as a fast way to move the data and formatting in a range of columns in the sheet. To move a range of cells, use the MoveRange method. To move a range of rows, use the MoveRowRange method.

Moving a range of columns using the MoveColRange method moves the data and formatting, including formulas and cell notes.

Moving a range of columns cuts the columns and pastes them at the designated location. The pasted columns delete the contents of existing columns. For example, pasting columns B and C to column F pastes column B's and column C's contents into columns F and G, deleting the contents of columns F and G.

Caution: Moving a range of columns pastes them over existing columns. You might want to caution users and have them verify a move command before overwriting their existing data.

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.

You can copy and swap ranges of columns using the CopyColRange and SwapColRange methods.

Return Type

None

See Also

Moving Data Using Code

Sheet property

CopyColRange, CopyRowRange, MoveRange, MoveRowRange, SwapColRange, SwapRowRange methods

DLL Correspondence

SSMoveRange function

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