hairyfingers
New Member
- Joined
- Sep 10, 2015
- Messages
- 18
Is it possible via VBA to prevent a user from protecting a sheet?
Why would I want this?
I have a large spreadsheet that is locked down in every way with password protection at the sheet & workbook level - apart from 3 sheets that the users can do what they want with - they are unprotected.
The problem is if a user chooses to protect any of those sheets, and chooses a password that isn't the same as my password, the macro falls over trying to unprotect the user sheet.
I could use error resume next whilst trying to unprotect those sheets
I could skip over the usersheets when trying to unprotect them
but what I'd like to do is have something in the sheet itself preventing it in the first place
possible?
Why would I want this?
I have a large spreadsheet that is locked down in every way with password protection at the sheet & workbook level - apart from 3 sheets that the users can do what they want with - they are unprotected.
The problem is if a user chooses to protect any of those sheets, and chooses a password that isn't the same as my password, the macro falls over trying to unprotect the user sheet.
I could use error resume next whilst trying to unprotect those sheets
I could skip over the usersheets when trying to unprotect them
but what I'd like to do is have something in the sheet itself preventing it in the first place
possible?