Password protect to hide sheets and visible only to the right worker

rama1209

New Member
Joined
Feb 25, 2011
Messages
22
I have a sheet with multiple sheets for different employees. When the workbook is opened I want the employee to be able to see only his/her sheet. The manager should be able to see all sheets. The sheets should be password protected so that only the correct sheet is displayed to the right employee.
PS I wish I can upload my files so that you can see what I mean. I hope this message is clear.
 
Thanks for the resposne. The files are not super sensitive. It just used to keep prying eyes away. The password to view code is donttouch
THe user name is Manager and the password is secret
Thanks again
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
How is your code not working for you? With the exception of the Crew_1_AM sheet, everything appears to be doing what you're asking for. The Crew_1_AM is not working because in your worksheet "Hide this sheet", in C10 you have a value which is not the name of the worksheet, so the code bombs when you try to unhide that sheet, thus leaving the userform open but messaging the user that it has worked.

I would also recommend not having the "Splash" worksheet showing when someone enters a 'good' password.

Also, when your workbook is supposed to close after 3 attempts, it doesn't close. Not sure what you're after there. Also, when the userform is initialized your "iCounta" is reset to 3. So if your workbook doesn't close, they will just need to close the userform and reload it for more chances. Seems kind of silly if you're just going to do it that way. ?
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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