XLL+ Class Library (6.3)

CXlOper::MoveRefBy

Moves a reference by the specified number of rows and columns

BOOL MoveRefBy(
   long nRows,
   long nCols
);

Parameters

nRows

Number of rows to move by (negative is up, positive is down).

nCols

Number of columns to move by (negative is left, positive is right).

Remarks

The function will throw an exception of type CXlBadOperTypeException if the object does not contain a single or multiple reference.

The function will throw an exception of type CXlOutOfRangeException if the new position would be out of range.

This method is a short-hand for getting a reference, moving it, and setting it. Thus, the following:

xloRef.MoveRefBy(0, 1);

is a short-hand for:

CXlRef xlr = xloRef.GetRef();
xlr.MoveBy(0, 1);
xloRef.SetRef(xlr);

Requirements

Header: xllplus.h

See Also

CXlOper Class | CXlOper Methods | CXlOper::GetRef() | CXlOper::SetRef()