View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mikeang[_4_] mikeang[_4_] is offline
external usenet poster
 
Posts: 1
Default Which routine called Sub()?

I want to know which routines are calling a particular Sub().

I thought Application.Caller would give me the result but it does not.

Private Sub Workbook_Open()

'change the Excel environment
SetEnvironment

.....
End Sub

Sub SetEnvironment()

Debug.Print Application.Caller (always returns an Error 2023)

.....
End Sub

Any ideas on the best way to find out where all the calls to a
particular sub are coming from?

Many thanks.

Mike Angellotti


---
Message posted from http://www.ExcelForum.com/