ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   password protect individual sheets (https://www.excelbanter.com/excel-programming/444229-password-protect-individual-sheets.html)

zxcv[_2_]

password protect individual sheets
 
I see that I can password protect an entire workbook but is there a
way to protect individual sheets? That is, when a user tries to tab
onto one excel will prompt for a password before allowing it to open.
The reason for this is I have several sheets that different users will
update but they do not want others to see their data but there is also
a combination sheet that combines portions of their data so it would
be a real pain to do this in separate workbooks. I know I could do
something with the SelectionChange or with hiding sheets or by making
text white but I want something relatively bullet proof that a savvy
user would not be able to easily circumvent by simply unhiding a sheet
or changing colors.

GS[_2_]

password protect individual sheets
 
It happens that zxcv formulated :
I see that I can password protect an entire workbook but is there a
way to protect individual sheets? That is, when a user tries to tab
onto one excel will prompt for a password before allowing it to open.
The reason for this is I have several sheets that different users will
update but they do not want others to see their data but there is also
a combination sheet that combines portions of their data so it would
be a real pain to do this in separate workbooks. I know I could do
something with the SelectionChange or with hiding sheets or by making
text white but I want something relatively bullet proof that a savvy
user would not be able to easily circumvent by simply unhiding a sheet
or changing colors.


Sheet protection will only prevent users from editing locked cells
unless they know the password.

Sounds to me that you need some methodology to manage the display of
individual sheets that maybe requires a userform type of login to
display the appropriate sheets for that user. Usernames, passwords, and
a list of sheets each user is allowed to view/access can be stored in a
hidden worksheet. In your case, the setting for hidden sheets should be
'xlVeryHidden' so they don't appear in the hide/unhide dialog. Also,
you'll need to password protect the VBA project to keep users from
messing with it that way.

The login form might include a ListBox where users can select the
sheetnames of sheets they want to access/view. Provide a button or
menuitem whereby users can bring up the userform, OR have it load via
the Workbook_Open event.

HTH

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc




All times are GMT +1. The time now is 06:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com