Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default 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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLookup only calling one cell Alexander Excel Discussion (Misc queries) 3 September 21st 08 08:47 PM
Calling Cell (or ROW() and COLUMN() in VBA) Scott Excel Programming 2 February 13th 06 08:22 AM
Referencing Calling Cell JE McGimpsey Excel Programming 0 March 2nd 04 08:18 PM
Referencing Calling Cell Chip Pearson Excel Programming 0 March 2nd 04 08:16 PM
calling VBA functions from a cell rturner138 Excel Programming 2 January 19th 04 09:11 PM


All times are GMT +1. The time now is 01:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"