View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default restrict access to individual users - excel tabs

This type of security in excel is not very robust. If you really want to stop
all others from seeing that data, then don't put it in excel or don't share the
workbook with others.


Rich wrote:

I did it but even though it restricts access to change anything it still
doesn't stop someone from viewing it. I need each tab to be viewed by only
the one person that I give the password to.
--
Rich

"Eduardo" wrote:

Hi Rich,
In the sheet you want to hide and unhide with a password, right click with
the mouse on the tab name and then copy this code, then hide it, when trying
to open the sheet from the Menue it will ask for the password, change
password to yours

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



"Rich" wrote:

I have tabs in an excel spreadsheet set up for different individuals. I want
to put in a password that allows that specific user to open up their tab only
so that only they can view their information in that tab. I will then put
the file in a shared folder.
--
Rich


--

Dave Peterson