Find out who called a .NET method
When debugging, it is useful to know who called a method (if it is being called from multiple places)
Include these
Imports System.Reflection Imports System.Diagnostics
Place this code on the beginning of the method being called.
Dim st As StackTrace = New StackTrace() Dim sf As StackFrame = st.GetFrame(1) MsgBox("I was called by: " & sf.GetMethod.Name)