Is there is way to access cell that contains my UDF? I need to reset some cache when function with same parameters is run from different cell. Didn't find anything suitable in exceldna utils.
Thanks, Alex
Is there is way to access cell that contains my UDF? I need to reset some cache when function with same parameters is run from different cell. Didn't find anything suitable in exceldna utils.
Thanks, Alex
You can call
ExcelReference caller = XlCall.Excel(XlCall.xlfCaller) as ExcelReference;
The result will be an ExcelReference
if you're called from a sheet formula. It might be null
if you're called via Application.Run
or a few other ways.
ExcelReference
is a wrapper for the C API sheet reference.