J
JR
Anyway to retrieve the function name in the module the code is running
in.
I want to have an email sent to me in the error trap if there is a
failure and want it to send me the name of the function. I could just
type in the name in a text string, but I want to use this in a bunch of
modules and would rather have something generic like "
CurrentFunction.name"
i.e.
"An error occurred in module " & CurrentFunction.name
I was able to get the module name but not the function name.
ModuleName = Application.VBE.ActiveCodePanel.CodeModule
John
in.
I want to have an email sent to me in the error trap if there is a
failure and want it to send me the name of the function. I could just
type in the name in a text string, but I want to use this in a bunch of
modules and would rather have something generic like "
CurrentFunction.name"
i.e.
"An error occurred in module " & CurrentFunction.name
I was able to get the module name but not the function name.
ModuleName = Application.VBE.ActiveCodePanel.CodeModule
John