
Get the name of a function that calls another function
On Thu, 5 Aug 1999 09:59:10 +0100, "Jonathan Holland"
Quote:
>Hi,
>I have some code to write to a text file everytime a function is called. I
>would like also to write the name of the calling function. Is there any way
>for a function to find out the name of the function that is calling it ( and
>the component that the calling function is in)?
>Thanks,
>Jonathan
Jonathan,
Why don't you just add an extra string parameter to your function, and
then pass the calling function name to it? Something like this:
Sub WriteToTextfile(TextToWrite As String, FunctionCallingMe As
String)
...
End Sub
Sub Foo()
WriteToTextfile "Hello World", "Foo"
End Sub
Mattias
________________________________________________
Mattias "BeeZo" Sj?gren
http://home1.2.sbbs.se/mattias.sjogren/sw/