Lock tabs within workbook with Passwords

lisab0712

New Member
Joined
Aug 18, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi I need to lock individual tabs within a workbook so they can't be viewed without entering a password. I have been told this is done by a macro but i can't find instructions on how to do this.

Any help would be appreciated.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi I need to lock individual tabs within a workbook so they can't be viewed without entering a password. I have been told this is done by a macro but i can't find instructions on how to do this.

Any help would be appreciated.
To completely lock a sheet for viewing, follow these steps:

  1. Right-click the sheet you want to protect (here, Sheet1), and click Hide.


password protect sheet for viewing 2




  1. Now, protect the workbook. In the Ribbon, go to Review > Protect Workbook.


password protect sheet for viewing 4




  1. Enter a password, and press OK.


password protect sheet for viewing 5




  1. Reenter the password to confirm and click OK.


password protect sheet for viewing 6




Now, if you try to unhide the sheet, you’ll see that the unhide option is disabled. This means you have completely protected your worksheet from viewing.



password protect sheet for viewing 7
 
Upvote 0
To completely lock a sheet for viewing, follow these steps:

  1. Right-click the sheet you want to protect (here, Sheet1), and click Hide.


password protect sheet for viewing 2




  1. Now, protect the workbook. In the Ribbon, go to Review > Protect Workbook.


password protect sheet for viewing 4




  1. Enter a password, and press OK.


password protect sheet for viewing 5




  1. Reenter the password to confirm and click OK.


password protect sheet for viewing 6




Now, if you try to unhide the sheet, you’ll see that the unhide option is disabled. This means you have completely protected your worksheet from viewing.



password protect sheet for viewing 7
Thank you for your reply but this isn't what I need. I need multiple people to be able to see the tabs but no access them all only the ones they have passwords for. Any idea how to do this?
 
Upvote 0
Thank you for your reply but this isn't what I need. I need multiple people to be able to see the tabs but no access them all only the ones they have passwords for. Any idea how to do this?
You could give the people that need to see them, the password?
The only other option I can think of, is not actually using passwords, but have VBA prompt the user to enter a "password", when opening the workbook, and conditionally hide and lock based on the "password" you define for each user. However, anyone of the users can go into the VBA editor and pause the code and "unlock" all sheets.
This is an interesting problem, if I come across any other ideas, I will let you know.
 
Upvote 0
You could give the people that need to see them, the password?
The only other option I can think of, is not actually using passwords, but have VBA prompt the user to enter a "password", when opening the workbook, and conditionally hide and lock based on the "password" you define for each user. However, anyone of the users can go into the VBA editor and pause the code and "unlock" all sheets.
This is an interesting problem, if I come across any other ideas, I will let you know.
I believe this is what I need but a different password for each tab so they cant access other people's information. Do you have any instructions on how to do this?
 
Upvote 0
Select all cells in a sheet and then Protect Sheet. Everybody can see, but only people with password can edit.
1692441776962.png
 
Upvote 0

Forum statistics

Threads
1,215,160
Messages
6,123,355
Members
449,097
Latest member
thnirmitha

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