Master Workbook or Master Password to access a workbook with multiple password protected worksheets

namazin2

New Member
Joined
Aug 11, 2015
Messages
4
My company has an Excel workbook with a "Menu" worksheet with linked buttons to individual password protected worksheets for varying individuals.
Management wants to be able to open this file without having to type in the 15 some odd individual passwords each time. I've been tasked with figuring out how to accomplish this. Needless to say, this has taken up most of my day messing around with varying VBA. I CONCEDE! Not sure what the best way is... perhaps a master workbook with coding opening the main workbook and the 15 password protected pages? OR is there a master password that can be entered ONCE, over riding the others? Can anyone help me with this?! I am by no means experienced in this area, so actual code would be much appreciated.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Can you explain this in a little more detail? Do other people besides managers open this file, and if so, should they not have the password for the 15 worksheets?
 
Upvote 0
If only managers should be able to get to those protected sheets, maybe something like:
Code:
sMgrPW = Application.InputBox(Prompt:="Enter Manager Password.", Type:=1)
If sMgrPW = "Password"  'replace with real password
        'code to unprotect worksheets
Else
        MsgBox "Wrong Password!"
End If
 
Upvote 0
Can you explain this in a little more detail? Do other people besides managers open this file, and if so, should they not have the password for the 15 worksheets?

Yes there are 12 other users I believe, accessing THEIR specific worksheet on the "menu" page linked through a button with their own personal password.
The management have a list of the user's passwords, but I think they want to access the whole workbook without having to type in all the passwords every time they want to look at it. These are pages tallying individual sales stats, password protected from one another. There is also a sheet totaling all the individuals specs.

Was this what you were looking for?
 
Upvote 0
I found this...

Sub protect_sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect password:="123"
Next ws
End Sub

Sub unprotect_sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Unprotect password:="123"
Next ws
End Sub

BUT, I think that's if all the pages shared the same password.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top