Forum Discussion
Unlock VBA project on error (enable debug for protected projects)
The end user shouldn't be able to see and debug the code, but I should be able to on the end user's PC, at the very moment the error occurred - instead of being forced to unreliably attempt to reproduce it.
Error handlers make reproducing an error only harder to do - obfuscating the exact point in the code where the error occurred, and the circumstances that caused it to occur. I only use them to handle known/predicted errors.
I don't always want errors to be reported to me - I much prefer to be called on over as they occur to be able to analyse and troubleshoot them on the spot, in the moment and under the circumstances that the error occurred.
I can do that if the code is unlocked, but if the code is locked I have no such option, despite knowing the password to unlock the code - that doesn't help me if I'm not allowed to enter it to unlock the code without stopping the code using the 'End' button.
Okay, it makes sense to have the Debug button available even if the project is locked so that when you running into an error and the project is locked, you can click the Debug button to go into the project and enter the password to be able to debug the error, rather than disable the Debug button.
I think this is what you want.
But I suggest you post this request in the https://excel.uservoice.com/forums/304921-excel-for-windows-desktop-application rather than here.
Regards
- Haytham AmairahFeb 07, 2019Silver Contributor
Great! Nice to see your request https://excel.uservoice.com/forums/304921-excel-for-windows-desktop-application/suggestions/36778270-allow-the-use-of-the-debug-button-when-the-project.
I voted.
Regards,
Haytham