Hi i have a macro that runs over a protected sheet. So for it to run first i have a code that unlocks it using the password of the sheet
. At the ende of the code i just put the same code for protecting it again putting Protect instead of unportect. The problem is that this kind of protection only allows the user to select the cells and enter values. I want it to have the option to format the cells and collumns too. When i recorded a macro with this i came up with this code:
It now works fine, and i'm able to format cells but the password dont input so if the user presses unlock it unlocks because has no pass. When i try to add the Password code at the end or beginnig of this new code i get the error presented in the attached image. Can you tell me whats wrong?
The code i'm trying to use is this:
Bookmarks