View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Eduardo Eduardo is offline
external usenet poster
 
Posts: 2,276
Default Passwords for Multiple Users of Workbook

hI,
In the worksheet you want the owner to open copy the code as follow, to do
that go to the tab right click in the mouse, view code and copy it there,
change the password to your needs, you will have to do the same with each
sheet with different passwords

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


If this help please click yes, thanks

"Brandy" wrote:

This is what I really want: 1 workbook with 7 worksheets. each worksheet has
it's unique "owner". i would like like the owner of that worksheet to have a
password that will allow them to open their worksheet and make modifications
as needed. each owner can ONLY open their worksheet. then 1 "general"
password that would allow an administrator to open ALL of the worksheets and
review the information as necessary.

is there a way to do all that???