viewing worksheets

  • Thread starter Thread starter Rusty Puckett
  • Start date Start date
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
 
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
 
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!
 
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.
 
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.







.
 
Back
Top