Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Which routine called Sub()?
No built in provision for this. You would have to have the calling
routines pass in their names or look at the call stack in the debugger. -- Regards, Tom Ogilvy "mikeang " wrote in message ... 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/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sub routine | Excel Discussion (Misc queries) | |||
Sort Routine | Excel Discussion (Misc queries) | |||
Solver VBA routine | Excel Discussion (Misc queries) | |||
Routine?? | Excel Programming | |||
Need VBA Routine | Excel Programming |