Or, at least i'd think of them as tricks, since it is not obvious to me!
o Is there any way to find the address of the cell that is currently calling the UDF? Say, you set a breakpoint, and want to know which cell it is now calculating when it hits the breakpoint.
o Is there a way to set a conditional breakpoint on a particular cell as calling the UDF? For instance, only break when this function is called from cell A5, etc? (In the VBA editor).
o Is there a way to get the text of the argument that is in the UDF call from the sheet? For instance, if my UDF is declared as Function MyFun(arg1). Say, on the sheet it is called with =MyFun(Max(A5:A10)). In the function execution code, i will get arg1 as the value of Max(A5:A10). Within UDF(VBA) code, can i get at the text for the argument, which in this example is "Max(a5:a10)"?
Thanks,
tom
o Is there any way to find the address of the cell that is currently calling the UDF? Say, you set a breakpoint, and want to know which cell it is now calculating when it hits the breakpoint.
o Is there a way to set a conditional breakpoint on a particular cell as calling the UDF? For instance, only break when this function is called from cell A5, etc? (In the VBA editor).
o Is there a way to get the text of the argument that is in the UDF call from the sheet? For instance, if my UDF is declared as Function MyFun(arg1). Say, on the sheet it is called with =MyFun(Max(A5:A10)). In the function execution code, i will get arg1 as the value of Max(A5:A10). Within UDF(VBA) code, can i get at the text for the argument, which in this example is "Max(a5:a10)"?
Thanks,
tom