Cell Address of the caller function

Aug 30, 2013 at 8:45 AM
Hi,

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.

Fadhel
Coordinator
Aug 30, 2013 at 1: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.