How do I find which cell called a function?

T

TL

I have a user function called from a cell on the
spreadsheet which draws a line based on input from
ajoining cells.

The cell content looks like this:

=LinkDraw(x1,y1,x2,y2)

The value of the cell is just 0 for fail and 1 for success.

Works great, but now I need to be able to determine, from
within the LinkDraw() function, which cell called the
function.

Ideally, I would like to do this without any kludgy
nonsense like feeding the answer as an input variable:

=LinkDraw(x1,y1,x2,y2,CELL(row),CELL(col)) <-Yucky.

Any suggestions?
-TL
 
A

Alan Beban

If Type Of Application.Caller Is Range Then
Msgbox Application.Caller.Address
End if

Alan Beban
 

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