I want to share my macros with my colleagues. However, if they were to run the macro incorrectly which is bound to happen at the start, on the wrong sheet, an error messages comes up, as shown in attachment.
They can click on the Debug option and this will bring up the macro code. However, I don’t want them to do this because they might delete the code. What are the best options to prevent this?
I read up on password protection here or should I use an Excel VBA On Error Statement?
Ideally, I would like it to display an error message that just say’s ‘You have used this on the incorrect sheet, please try again.’
Example of one of my macro codes, do I put the macro error code in the same module?
Bookmarks