View by User
Private Sub Workbook_Open()
strUser = Environ("Username")
Select Case strUser
Case "John"
Sheets("Sheet2").Visible = False
Sheets("Sheet3").Visible = False
Case "Peter", "Mary"
Sheets("Sheet1").Visible = False
Sheets("Sheet3").Visible = False
End Select
End Sub
--
If this post helps click Yes
---------------
Jacob Skaria
"Pam M" wrote:
How would I tie that to a user? For instance User 1 should see sheets A & B,
user 2 only A and user 3 only B.
"Jacob Skaria" wrote:
You can use the workbook open event. Launch VBE using Alt+F11. Double click
on 'This Workbook'.Drop down to find Workbook open event.
Private Sub Workbook_Open()
Sheets("Sheet2").Visible = False
Sheets("Sheet3").Visible = False
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"Pam M" wrote:
I have a workbook that will be shared that contains several worksheets.
Depending on the user, I want different sheets hidden from view upon opening
the workbook. Is there an easy way to do this?
|