Password Protection for Viewing

  • Thread starter Thread starter Bridget Stacy
  • Start date Start date
B

Bridget Stacy

I have an Excel file that contains several tabbed
worksheets. I'd like to find out if there is some way to
password protect some of the worksheets included in the
file so that no one can view the sheet unless they have
the password.

Is there a way to do that?
 
Just to let you know, protection in excel is not very secure, a search on
this newsgroup or the web will find many post on the subject. If some body
wants to see the sheets you can not stop them in excel

--
Paul B
Always backup your data before trying something new
Using Excel 97 & 2000
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
 
I don't think that will work. I want everyone to be able
to open up the workbook, however I only want certain
managers to see one of the sheets within that workbook.
They would be givent the password that would allow them to
view the sheet, if I can password protect at the worksheet
level. Is that possible?
 
Bridget, if you want to try it use something like this,

Sub unhidesheet()
pname = InputBox("Enter password to access sheet")
If pname = "123" Then
Sheet1.Visible = xlSheetVisible
Sheet1.Select
Else:
Sheet1.Visible = xlSheetVeryHidden
End If
End Sub

you will have to lock the VBA code so the password can not be seen, again
this can be defeated if someone really wants to see the sheet

--
Paul B
Always backup your data before trying something new
Using Excel 97 & 2000
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
 
Back
Top