Hi everyone,
I've implemented an error system in my program (using VBA in Excel). I would like know if there's an easy way to capture the name of a running macro.
Given that this is an error handleling system, I'd rather use excel coding to get the macro name rather than manually putting the name every time i launch a routine/function as this might lead to other errors due to typos, routine changes, etc.
The closest I've come across is this code:
Any thoughts on how I could get the name of the macro ???![]()
Application.VBE.ActiveVBProject.VBComponents("MyModule").????? ' which could also be ... Application.VBE.ActiveVBProject.VBComponents(Application.VBE.ActiveCodePane.CodeModule ).?????
Any help is apprecited.











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks