Returns a copy of one of the single references in a multiple reference
CXlRef GetRefItem( WORD wItem ) const;
The index of the range to retrieve. The first item is at position 0.
Returns a copy of one of the single ranges in a multiple reference. If the CXlOper contains a single reference, and wItem is 0, then the function will return the single reference itself.
Under XLL+ version 5 and below, this method returned a reference to the actual CXlRef contained within the CXlOper, which could then be written to directly. In order to support Excel 2007 as well as earlier versions of Excel, this functionality has had to be changed.
The method now returns a copy of the CXlRef contained in the CXlOper; in order to change its value, you must call SetRefItem to apply any changes. Thus, if your existing code is:
You will need to change it to:
CXlRef xlr = xloRef.GetRefItem(0); xlr.MoveBy(0, 1); xloRef.SetRefItem(0, xlr);
Alternatively, you can use the new short-hand function: