Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default View by User

Thanks!

"Jacob Skaria" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
View set to 'best fit' for User Adam Excel Discussion (Misc queries) 2 July 3rd 09 09:54 PM
User Choosing Which Columns to View Colin Vicary Excel Discussion (Misc queries) 3 June 29th 06 05:57 PM
specific user view G Excel Discussion (Misc queries) 0 January 24th 06 11:33 PM
Limiting view area to user jose luis Excel Programming 4 March 23rd 05 03:39 AM
Limiting view area to user jose luis Excel Programming 0 October 16th 04 12:27 AM


All times are GMT +1. The time now is 05:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"