Restrict access to excel sheets

helplessnoobatexcel

New Member
Joined
Dec 15, 2023
Messages
45
Office Version
  1. 365
Platform
  1. Windows
Hi guys, I would like to draft out a macro code to restrict access to certain sheets in excel to users but I am currently stuck in writing the code. PLS HALP T_T. Example, a shared excel notebook in which users can only view & edit their designated sheets and main users are given full access to view & edit all the sheets in the workbook. Alternatively, a code for password protecting the sheets would be good too! Many thanks >0<
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Welcome to the Board!

Not sure if this is what you are looking for, but you can protect each sheet with a password, and just give users the passwords to the sheets they should have access to.
If you want to protect/unprotect the sheet with VBA code, see here: How to PROTECT and UNPROTECT a Sheet using VBA in Excel
Hi, thanks Joe for your reply!
I've read the article you posted and it has helped me understand alot more about the code! I have tried it out, however I realised it's too tedious to encrypt each sheet individually I have a large number of sheets in my excel file. Any ideas on how I can do so? Thanks in advance!!
 
Upvote 0
So, every single sheet would be for a different user, who should have their own password?
If so, I am not sure how you get around the "tedious-ness" issue, as it appears to be a more logistical issue (the "nature of the problem/situation"), and not really an Excel issue. Excel is just the tool you are trying to use the solve the issue.

Also something else to consider - Excel is not known for being very secure. Excel secure is pretty easy to break for anyone willing to do a little research on the internet.
So if security is important and it is absolutely critical that members should only be able to see their own sheets and no one else's, Excel is probably not the best choice here.
 
Upvote 0
So, every single sheet would be for a different user, who should have their own password?
If so, I am not sure how you get around the "tedious-ness" issue, as it appears to be a more logistical issue (the "nature of the problem/situation"), and not really an Excel issue. Excel is just the tool you are trying to use the solve the issue.

Also something else to consider - Excel is not known for being very secure. Excel secure is pretty easy to break for anyone willing to do a little research on the internet.
So if security is important and it is absolutely critical that members should only be able to see their own sheets and no one else's, Excel is probably not the best choice here.
I see. Thanks Joe for your help so far.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,206
Members
452,618
Latest member
Tam84

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