Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I find which cell called a function?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default How do I find which cell called a function?

Take a look at the Application.Caller property in Help.

In article ,
"TL" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default How do I find which cell called a function?

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

Alan Beban

TL wrote:
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I find which cell called a function?

That works -- Thanks!
-TL

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

Alan Beban

TL wrote:
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


.

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
How do I know which cell a function is called from? Murami Excel Worksheet Functions 3 November 24th 06 02:22 PM
What is this function called?? jPaulB Excel Discussion (Misc queries) 3 August 4th 06 08:33 PM
Function, dont know what its called Michael Excel Worksheet Functions 1 May 8th 06 09:47 PM
How do I copy a function with a called cell constant? MitchCarter1957 Excel Worksheet Functions 1 September 6th 05 05:26 PM
mystery function called 'TABLE' SongBear Excel Worksheet Functions 7 January 7th 05 04:56 AM


All times are GMT +1. The time now is 03:15 PM.

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"