Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I know which cell a function is called from? | Excel Worksheet Functions | |||
What is this function called?? | Excel Discussion (Misc queries) | |||
Function, dont know what its called | Excel Worksheet Functions | |||
How do I copy a function with a called cell constant? | Excel Worksheet Functions | |||
mystery function called 'TABLE' | Excel Worksheet Functions |