XLL+ Class Library (7.0)

CXlOper::SetRef

Sets the first (or only) single reference in a single or multiple range reference

void SetRef(
   const CXlRef& xlr
);
void SetRef(
   RW12 rTop,
   COL12 cLeft,
   RW12 rBottom,
   COL12 cRight
);
void SetRef(
   RW12 rRow,
   COL12 cColumn
);

Parameters

xlr

A reference to a block of cells.

rTop

The top row of a range.

cLeft

The left-most column of a range.

rBottom

The bottom row of a range.

cRight

The right-most column of a range.

rRow

The row of a single cell.

cColumn

The column of a single cell.

Remarks

This method sets the XLREF contained by the CXlRef to reflect the values passed as parameters.

Remarks

The function will throw an exception of type CXlBadOperTypeException if the object does not contain a single or multiple reference. SetRef() should be used only if IsRef() returns TRUE, as in:

if ( xlo.IsRef() )
{
    CXlRef xlr(0, 0, 2, 3);
    xlo.SetRef(xlr);
}

Requirements

Header: xllplus.h

See Also

CXlOper Class | CXlOper Methods | CXlOper::GetRef() | CXlOper::GetRefCount() | CXlOper::SetRefItem()