I have been inspired by Nikita6003's response to "Run excel macro in batch??" to create my own logging routine.
What I want to do in an error logging routine is to call it with the name of the macro that initiated the error but realise that I do not know how to find the name of the macro being used.
I want to do the following:
Sub ThisMacro
on error goto Errorhandler
my code .....
Errorhandler:
ThisMacro = ?? Name of this macro??
Call MyErrorRoutine ThisMacro,error details
end sub
Any ideas please?
What I want to do in an error logging routine is to call it with the name of the macro that initiated the error but realise that I do not know how to find the name of the macro being used.
I want to do the following:
Sub ThisMacro
on error goto Errorhandler
my code .....
Errorhandler:
ThisMacro = ?? Name of this macro??
Call MyErrorRoutine ThisMacro,error details
end sub
Any ideas please?