viewing worksheets

R

Rusty Puckett

This is pretty basic, but is there a way to password
protect a hidden worksheet so that only people with the
password can unhide the worksheet?

Rusty
 
D

Don Guillett

Let me know if this helps. xlveryhidden can ONLY be opened with a macro.

Sub UnhidePassword()
x = InputBox("enter Password to open")
With Sheets("sheet3")
..Unprotect Password = x
..Visible = True
End With
End Sub

Sub hidepassword()
With Sheets("sheet3")
..Visible = xlVeryHidden
..Protect Password = "pw"
End With
End Sub
 
G

Guest

I'm pretty new at this stuff. Do I need to create
something called xlveryhidden myself?

Can you elaborate? I get a syntax error when I run the
macro.

Thanks!
 
D

Don Guillett

I just re-tested in xl95 and xl97 and xl2002. The only thing that needs to
be changed is to place a colon after password in both cases. OK., I found
the problem. Somehow you have two .. in the with statements. Change to ONE
dot.
 
G

Guest

This works. Thanks so much!
-----Original Message-----
I just re-tested in xl95 and xl97 and xl2002. The only thing that needs to
be changed is to place a colon after password in both cases. OK., I found
the problem. Somehow you have two .. in the with statements. Change to ONE
dot.







.
 

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