Pamela,
I would also need the name of the caller. Is it simple to get ?
You can use the System.Diagnostics.StackTrace &
System.Diagnostics.StackFrame classes.
Dim trace As New StackTrace()
Dim caller As StackFrame = trace.GetFrame(1)
Debug.WriteLine(caller.GetMethod(), "caller")
--
Hope this helps
Jay B. Harlow
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
<pa***********@libero.itwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
>
Phill W. ha scritto:
>>
Dim mb as MethodBase _
= MethodBase.GetCurrentMethod()
Thanks Phill . Very helpful.
I would also need the name of the caller. Is it simple to get ?
Sub Caller
me.CalledBy()
end sub
Sub CalledBy()
Dim FullNameOfCallerSub = ?????
msgbox(FullNameOfCallerSub)
end sub