View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mark Ivey[_2_] Mark Ivey[_2_] is offline
external usenet poster
 
Posts: 171
Default Address of cell invoking current UDF call?

Here is one option...

Sub GetCurrentAddress()
Dim myCell As String
myCell = ActiveCell.Address
MsgBox myCell
End Sub


Mark Ivey

"Eddie" wrote in message
...
I would like to write a user defined function that, as part of its
execution, needs to know the cell address from which it is currently
called. I.e. if
cell A1
= UDF(parm1, parm2)
then,
what type of statement can I use in the UDF to return the executing
cell address "A1"?

Assuming, of course, that such a thing is possible. Thanks in advance.
Larry.