Worksheet Filtering by UserName

K

KA

I have an excel workbook with 60 tabs (worksheets) that contain user
production data and I need a way that when someone opens up the workbook they
only see the (worksheet) tab with their information only and not the entire
workbook. Is there a way to do this in excel?

Thank you!
 
R

ryguy7272

Probably the best way to do this is to create a sheet and name it something
like 'Passwords' and put a command button in that sheet and point it to this
code:

Private Sub CommandButton1_Click()


Dim i_pwd As String

i_pwd = InputBox("Please Enter Password to Unhide Sheet", "Unhide Sheet...")
If i_pwd = "" Then
Exit Sub
End If
Select Case (i_pwd)
'#1
Case Is = "mypassword"
Worksheets("Sheet1").Visible = True
Worksheets("Sheet2").Visible = True
Worksheets("Sheet3").Visible = True
Worksheets("Sheet4").Visible = True
Sheets("Sheet1").Select

Case Else
MsgBox "Incorrect password; no action taken.", vbInformation, _
"Unhide Sheet..."
End Select

Exit Sub


End Sub


HTH,
Ryan---
 

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