Moves a reference by the specified number of rows and columns
BOOL MoveRefBy( long nRows, long nCols ); |
Number of rows to move by (negative is up, positive is down).
Number of columns to move by (negative is left, positive is right).
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);
Header: xllplus.h
CXlOper Class | CXlOper Methods | CXlOper::GetRef() | CXlOper::SetRef()