ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Address of calling cell? (https://www.excelbanter.com/excel-programming/400088-address-calling-cell.html)

DesertCyclist

Address of calling cell?
 
Is there a way for a UDF to know the address of the cell that called it? That
cell may not be the active cell!

Thank you.

Bob Phillips

Address of calling cell?
 
Application.Caller.Address

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"DesertCyclist" wrote in message
...
Is there a way for a UDF to know the address of the cell that called it?
That
cell may not be the active cell!

Thank you.




Tim Zych

Address of calling cell?
 
Application.Caller returns a range object:

Function Func1() As String
Debug.Print Application.Caller.Address
Func1 = "test"
End Function


--
Tim Zych
SF, CA

"DesertCyclist" wrote in message
...
Is there a way for a UDF to know the address of the cell that called it?
That
cell may not be the active cell!

Thank you.




Chip Pearson

Address of calling cell?
 
In a UDF, Application.Caller returns a Range object referencing the cell
from which it was called.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"DesertCyclist" wrote in message
...
Is there a way for a UDF to know the address of the cell that called it?
That
cell may not be the active cell!

Thank you.



DesertCyclist

Address of calling cell?
 
Thank you all. This did the trick!

"Bob Phillips" wrote:

Application.Caller.Address

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"DesertCyclist" wrote in message
...
Is there a way for a UDF to know the address of the cell that called it?
That
cell may not be the active cell!

Thank you.






All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com