Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
From which cell is my VBA function called ?
I have a VBA function that is called from many cells in several worksheets
in my workbook. The function performs some error trapping (data checking) and gives a message if an error is found. However, I need to retrieve information on from where the erroneous call of the function is placed (sheet and cell). Is it possible to get this information by VBA ? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
From which cell is my VBA function called ?
Application.Caller.Address
-- Kind regards, Niek Otten Microsoft MVP - Excel "Helge V. Larsen" wrote in message ... |I have a VBA function that is called from many cells in several worksheets | in my workbook. The function performs some error trapping (data checking) | and gives a message if an error is found. | | However, I need to retrieve information on from where the erroneous call of | the function is placed (sheet and cell). | | Is it possible to get this information by VBA ? | | |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
From which cell is my VBA function called ?
However, I need to retrieve information on from where the erroneous
call of the function is placed (sheet and cell). Would the "Caller" property work? Function MyFunction(x) If TypeName(Application.Caller) = "Range" Then Debug.Print Application.Caller.Address(External:=True) 'or maybe Debug.Print Application.Caller.Address(False, False, , True) End If MyFunction = x * x End Function HTH Dana DeLouis Helge V. Larsen wrote: I have a VBA function that is called from many cells in several worksheets in my workbook. The function performs some error trapping (data checking) and gives a message if an error is found. However, I need to retrieve information on from where the erroneous call of the function is placed (sheet and cell). Is it possible to get this information by VBA ? |
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 | |||
Need to know what cell called the custom VBA function? | Excel Programming | |||
How do I copy a function with a called cell constant? | Excel Worksheet Functions | |||
Find out which cell that called my function | Excel Programming | |||
How do I find which cell called a function? | Excel Programming |