Mar 24 2019 01:56 AM - edited Mar 24 2019 01:56 AM
Mar 28 2019 07:06 PM
Unfortunately, it is not possible to obtain the name of the currently executing procedure or function in VBA.
However, you may find it helpful to enable "Break in Class Module" under VBE (VBA Editor) > Options, and/or use Ctrl+L to show the Call Stack window when debugging, and add Watches there as well as use the Immediate Window. You can handle errors via On Error GoTo OnError statement for example and write error handling code like OnError: LogError(funcName) function which calls Debug.Print, but that requires writing out LogError("MyFuncName") for each function.
Also, if you're interested in PowerExcel.ai AI power tools (like Power Query and Pivot Table auto-generation) and new functions or PowerAnalytics.ai AI automated Data Prep for Excel, Access and Cloud, then you can register at PowerAnalytics.ai or begin using the cloud based version available online now.
I hope that helps.