Hello People
I have a "program" if that's what you'd call it that has 7 worksheets. 3 are visible, 2 are very hidden helpers & 2 appear when & if a macro is run & disappear when it ends. It also has 14 userforms, some with macros, some not & 18 modules.
I use the same password for all the worksheets & a different one for macro protection.
Is there a way to set up a master password for all the sheets? As it is now if I wanted to change the password I would have to go through each macro to change them. Is there a way to use or adapt the code below? Or would it be something completely different?
The whole thing is working as I want it to. I'm looking to improve maintenance efficiency.
Thanks
Private Sub DeleteShort() Dim Scr As Long Const strPassword As String = "IdHav2KillU" ActiveSheet.UnProtect Password:=strPassword Activesheet.Protect Password:=srtPassword End Sub
At the top of any standard module (not a Forms module, not a sheet module, not the ThisWorkbook module)
Then remove the declaration from all the procedures.Public Const strPassword As String = "IdHav2KillU"
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Thank you shg. That was easy. I now have only one module & one place to change the password for the lot, including userforms. Made life a lot easier
Cheers
You're welcome, good luck.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks