Password required to view WB help

SRC

New Member
Joined
Jan 22, 2004
Messages
2
How do you password protect a workbook that requires a password to modify or even view sheets/data. I am writing a macro that sets a password for a set of spreadsheets each month and I only want people with the password to view the workbook. I dont want anyone without the password to be able to open it as read-only.

Idea...

On opening the target WB, set all sheets to hidden, then have a userform pop up and ask user for the password, if the password is wrong, then close the workbook.

I've read many posts about excels protect method, but I dont want anyone to be able to open it in read-only mode. Is there an way to remove the read-only option?


SRC
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
You can set a file level password.
Do file SaveAs... Select options and assign a password.
If they don't know the password, they can view the file.
This will not protect sheet contents from change if the person does have the password.
 
Upvote 0

Forum statistics

Threads
1,203,082
Messages
6,053,417
Members
444,662
Latest member
AaronPMH

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