XLL+ Class Library (6.3)

CXlOper::Resize

Returns a reference resized to the specified number of rows and columns

CXlOper Resize(
   RW12 nRows,
   COL12 nCols
) const;

Parameters

nRows

Number of rows reference should contain.

nCols

Number of columns reference should contain.

Return Value

Returns a new reference, with the same top and left as this reference, and with the specified number of rows and columns. The function will throw an exception if the new reference is not valid.

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, resizing it, and setting it. Thus, the following:

xlo2 = xlo1.Resize(3, 2);

is a short-hand for:

xlo2 = xlo1;
CXlRef xlr = xlo2.GetRef();
xlr.Resize(3, 2);
xlo2.SetRef(xlr);

Requirements

Header: xllplus.h

See Also

CXlOper Class | CXlOper Methods | CXlOper::Offset() | CXlOper::MoveRefBy()