TempActiveCell/TempActiveCell12
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Framework library functions that create a temporary XLOPER/XLOPER12 containing an external reference to a cell on the active sheet.
LPXLOPER TempActiveCell(WORD row, BYTE col);
LPXLOPER12 TempActiveCell12(RW row, COL co);
Parameters
row
The row to be referenced. Row arguments are zero-based so that row 1 is passed as 0. In Microsoft Office Excel 2003 and earlier versions, and in Microsoft Office Excel 2007 running a workbook in compatibility mode, the maximum value is 65,535 = 2^16 - 1 and is the maximum value that can be taken by a WORD integer. In Excel 2007 running a 2007 format workbook, the maximum value is 1,048,575 = 2^20 - 1. RW is defined as a 32-bit signed integer in XLCALL.H.
col
The column to be referenced. This is zero-based so that column A is passed as 0. In Excel 2003 and earlier versions, and in Excel 2007 running a workbook in compatibility mode, the maximum value is 255 = 2^8 - 1 and is the maximum value that can be taken by a BYTE integer. In Excel 2007 running a 2007 format workbook, the maximum value is 16,383 = 2^14 - 1. COL is defined as a 32-bit signed integer in XLCALL.H.
Return Value
Returns an xltypeRef external reference to the cell passed in.
Example
The following example uses TempActiveCell12 to display the contents of B94 on the active sheet.
\SAMPLES\EXAMPLE\EXAMPLE.C
short WINAPI TempActiveCellExample(void)
{
Excel12f(xlcAlert, 0, 1, TempActiveCell12(93,1));
return 1;
}