Cell Address of the caller function

Aug 30, 2013 at 9:45 AM

Is there a way to get the address of the cell (Workbook, Worksheet, Row, Column) from which an XLLFunction has been called? I tried to look myself in the XLL library but did not find any example.

I would like to append this information to the object name created in the corresponding cell.

Many Thanks.

Aug 30, 2013 at 2:07 PM
    OPERX oResult = ExcelX(xlfReftext, ExcelX(xlfCaller), OPERX(true));
Will get you an A1 style reference to the calling cell. Be sure to mark the function as Uncalced().
Macrofun.hlp in the xll/xll directory is the Rosetta Stone. Search for REFTEXT.