Password Protection

Brian F

Active Member
Joined
Aug 31, 2009
Messages
256
Excel 2010, Windows 7: Is it possible to password protect an Excel document at an "Administrator" or a executive level. I want to grant access to the document, and the ability to manipulate it as they choose, to everyone with the password but prohibit them from changing the password once they are in. It seems to me that I CAN'T do what I'm asking but it wouldn't be the first time I was wrong. Any help or advice is appreciated.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
I typically use a userform that pops up and asks for a password to change anything, that way I can have multiple options available and you don't have the annoying read only message popping up every time you open a workbook.

You can use the protect sheet code when you open the workbook.

I use it when you open the workbook as if you use it before you close the workbook you encounter problems if someone doesn't want to save changes.

Code:
Sub ProtectSheet()
Dim Password    'This line of code is optional
Password = "1234"
ActiveSheet.Protect Password, True, True, True
'Add in the following line if you want the user
'to be able to select the cell but not change anything
'ActiveSheet.EnableSelection = xlNoRestrictions
End Sub


Sub UnProtectSheet()
Password = "1234"
ActiveSheet.Unprotect Password
End Sub
 
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