PDA

View Full Version : VBA to Auto-populate the Sheet "Protect" password field(s)



Dbrav
08-19-2018, 12:45 PM
I run an office in which multiple users must access and make changes to the same spreadsheet (each Sheet of which is password protected) ... then reprotect each Sheet using the same password.

Recently, a user reprotected a Sheet using a password containing a typo (yes, it was entered incorrectly twice) - and we were all effectively locked out from making changes to that Sheet.

What I need is a way to password protect (NOT unprotect) a Sheet by automatically populating the password field(s) of the window that pops up whenever a user clicks on "Protect Sheet".

To make this simple, I'd like to be able to typy a password into a specific cell on a given Sheet and, when protecting that Sheet, have a macro that will access that cell and use the value entered therein to automatically populate the password fields of the "Protect Sheet" window.

Anyone know of a way to do this? If not, are there any intrepid VBA guru's interested in trying to create one?

I believe that VBA is the only way to do this, but I'm not VBA savvy (it would be fair to classify me as a VBA idiot). So ... I will need 3rd grade level (step-by-step) instructions for installing and running anything that you come up with.

Thanks to any and all of you who have taken the time to read this and consider my request for help!