Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
name of calling routine
I suspect the answer is "you can't" but does anyone know of a way to return
the name of the routine that's called a function? Failing that, some generic code that returns the name of the current sub or function? I'm just writing a universal error routine and it's a pain having to send the calling routine's name by hand each time. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
name of calling routine
Your latter comment implies you don't like:
Sub RoutineA() '... CallFunctionX RealParameter,"RoutineA" '... End Sub Function CallFunctionX(WhatIneed,WhoCalledMe as String) '... 'WhoCalledMe is the routine who called me in '... End Function Sub AnotherGuy() '... CallFunctionX RealParameter,"AnotherGuy" '... End Sub But aside from numbering every line and using the erl (line # function), I don't know of a way (would be a nice thing to have -- some way to easily to invoke the Call Stack) Bob Umlas "Smallweed" wrote in message ... I suspect the answer is "you can't" but does anyone know of a way to return the name of the routine that's called a function? Failing that, some generic code that returns the name of the current sub or function? I'm just writing a universal error routine and it's a pain having to send the calling routine's name by hand each time. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Read directly a returned array in the calling routine | Excel Programming | |||
Using (what goes in here) for sub routine | Excel Programming | |||
SUB ROUTINE | Excel Programming | |||
Keep userform visible, but return control to calling routine | Excel Programming | |||
Need VBA Routine | Excel Programming |