Calling sheet when usgin xlfCaller

M

Max Reimerson

Hi I am using the Excel SDK to write an XLL plug-in in C++.

I need to figure out the sheet my worksheet functions are using for my
plug-in. I use the xlfCaller which gives me a sheet ref, i.e. without the
sheetID. To get the sheetID I use the xlSheetID which gives me the ID of the
active sheet. However the problem is if a function is referencing a cell in a
different sheet. If I then change the referenced cell the function would give
me the sheetID of the active sheet, which is different to the sheet it sits
in.

I have built a plug-in that attaches “objects†to my functions, but that
means that I have to constantly know which cell every function is executed
from.

I saw that there was a proposed function xlCallerAddress that would do
exactly this ( http://blogs.msdn.com/excel/archive/2006/07/13/664162.aspx ).
However that was taken out before it was shipped (
http://blogs.msdn.com/excel/archive/2006/09/12/751080.aspx )

Is there any way of getting access to that function or get the sheet of the
calling cell even if it isn’t in the active sheet.

Many Thanks,

Max
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top