Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default identifying caller procedure

Hi All,

Is there any feature in VBA for identifying a caller procedure? E.g. if Sub
C is called from Sub A and Sub B, i'd like to know in Sub C that it was
called from Sub A or Sub B.

Thanks,
Stefi

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default identifying caller procedure

Hi Stefi,

Is there any feature in VBA for identifying a caller procedure? E.g. if Sub
C is called from Sub A and Sub B, i'd like to know in Sub C that it was
called from Sub A or Sub B.


One way would be bt using an argument:

Sub A(sCaller as String)
Msgbox "I was called by: " & sCaller
End Sub

Sub B()
A "Sub B"
End Sub

Sub C()
A "Sub C"
End Sub

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default identifying caller procedure

Thanks Jan Karel, I thought there is a built-in feature, but if there isn't
one, I'll use this method.
Stefi


€˛Jan Karel Pieterse€¯ ezt Ć*rta:

Hi Stefi,

Is there any feature in VBA for identifying a caller procedure? E.g. if Sub
C is called from Sub A and Sub B, i'd like to know in Sub C that it was
called from Sub A or Sub B.


One way would be bt using an argument:

Sub A(sCaller as String)
Msgbox "I was called by: " & sCaller
End Sub

Sub B()
A "Sub B"
End Sub

Sub C()
A "Sub C"
End Sub

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User_Form's Caller PerlDev Excel Discussion (Misc queries) 1 October 20th 06 06:59 PM
application caller Rich Excel Programming 1 September 21st 06 07:48 PM
Who's my caller info? count Excel Programming 4 April 4th 04 05:03 PM
DDE and application.caller help Ross Kaminsky Excel Programming 1 July 17th 03 04:17 PM


All times are GMT +1. The time now is 03:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"