Office 2007 - protecting workbook

J

JWhitehead

I have a user who is running office 2007, and is trying to protect a workbook
in Excel. I know how to do this part. The question is though, is it possible
to pwd protect the viewing of only one worksheet.

Example: there are 2 pages in the workbook. Page 1 has data that everyone
can view. Page 2 has data that only some can view. Other than pwd protecting
the contents of page 2 and changing the font colour to white, is there a way
to do this?

Thank you all for your help.
 
E

Eduardo

Hi,
What I did in a similar case is to hide the workbook that I don't want
anybody to look at and then protect the sheet, then I give the password to
the users I want to see the information. To unprotect the sheet I prepare a
macro asking for the password, however when hidding the sheet be sure that
you go far from where the information is let's say AZ1000, the reason is
because when asking for the password the sheet shows up first if the password
is incorrect it will hide again, hiding it in AZ1000 makes the user first
thing to see is that cell

if this helps please click yes
 
E

Eduardo

hI,
This is the code used to copy it do right click in the tab name, view code
and copy it, change the password to yours, if you want to have different
sheets to be unhided with different password you will have to change the
password in each sheet

Private Sub Worksheet_Activate()
Dim strPassword As String
On Error Resume Next
Me.Protect Password:="MANAGER"
Me.Columns.Hidden = True

strPassword = InputBox("Enter password to access DATA sheet")

If strPassword = "" Then
ActiveSheet.Visible = False
Worksheets("Menu").Select
Exit Sub
ElseIf strPassword <> "MANAGER" Then
MsgBox "Password Incorrect "
ActiveSheet.Visible = False
Worksheets("Menu").Select
Exit Sub
Else
Me.Unprotect Password:="MANAGER"
Me.Columns.Hidden = False
End If
Range("a1").Select

On Error GoTo 0
End Sub

Private Sub Worksheet_Deactivate()
On Error Resume Next
Me.Columns.Hidden = True
On Error GoTo 0
End Sub

to unhide the sheet just create a buttom with a macro asking to unhide sheet
???

if this helps please click yes, thanks
 
J

JWhitehead

Thanks to all who considered an idea for this. What I found is that we can
hide tabs in Office 2007. This will work, and then those who need to know,
will be told that they have to unhide the tab.
 

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