function calling cell

  • Thread starter Thread starter Qingde Shi
  • Start date Start date
Q

Qingde Shi

Hi Masters,

Is there a way to know the calling cell inside the a
function?
eg, there are two (or thousands) cells contain the same
function. within the function, how could get the address
of the cell which the function value return back to?

Many thanks.
 
One of these:

MsgBox Application.Caller.Address & vbLf & _
Application.Caller.Cells(1).Address & vbLf & _
Application.ThisCell.Address

The last one (ThisCell) was added in xl2002.

The difference between the top two is for multicelled array formulas.
 
Thanks, Dave.

One more question, can you change the caller's properties
within the function and how?

Thanks again.

Qingde
 
Back
Top