Saqib Husain
asked on
Getting the calling sub
Is it possible, in a sub or function, to get the name of the routine or function which is calling it?
I know it can return how it was called from excel by the application.caller method.
Saqib
I know it can return how it was called from excel by the application.caller method.
Saqib
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Saqib
Why do you want/need to know the name of the calling sub?
I'm pretty sure tou can't use Application.Caller, which is pretty limited anyway.
I would think the code Dave posted might be of some use but I've not seen the method either and it looks like the
code is manipulating the VBE in some way.
Why do you want/need to know the name of the calling sub?
I'm pretty sure tou can't use Application.Caller, which is pretty limited anyway.
I would think the code Dave posted might be of some use but I've not seen the method either and it looks like the
code is manipulating the VBE in some way.
ASKER
Dave,
This solution is a bit too complex for me and I need more time to try it out. Sorry for holding you up
Saqib
This solution is a bit too complex for me and I need more time to try it out. Sorry for holding you up
Saqib
Object as the solution I provided works, and the simple workaround " store the current module name in a Public variable" in the same comment (a33689196.html) would have sufficed if the detailed solution was deemed too complex
Cheers
Dave
Cheers
Dave
ASKER
I give up. Did not get to try it. Will come back whenever I try it. Thanks for the patience and sorry for the holdup.
Saqib
Saqib
ASKER
closing
I posted the link for it might help you. It discusses re: application.caller method.
http://www.cpearson.com/excel/sheetref.htm
Sincerely,
Ed