Password Protection for Viewing

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?
 
P

Paul B

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 **
 
B

Bridget Stacy

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?
 
P

Paul B

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 **
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top