RichardMGreen
Well-known Member
- Joined
- Feb 20, 2006
- Messages
- 2,177
Afternoon all
I have a spreadsheet that is open to all users but certain "superusers" have additional tabs available to them
I'm trying to write a peice of code triggered by the auto_open event but it seems a bit long-winded. I'm using a variation of an "If" statement which looks like this :-
As the list of users is growing, I get the feeling there is a better way of checking if the user is a "superuser" rather than enlarging the IF statement above. For a normal user, the two sheets named above are "veryhidden" so they can't go into Format/sheets/Unhide.
Any ideas will be greatly appreciated.
I have a spreadsheet that is open to all users but certain "superusers" have additional tabs available to them
I'm trying to write a peice of code triggered by the auto_open event but it seems a bit long-winded. I'm using a variation of an "If" statement which looks like this :-
Code:
If application.username="username goes here" or application.username="username goes here" then
Sheets("4-weekly ave").Visible = True
Sheets("weekly stats").Visible = True
endif
As the list of users is growing, I get the feeling there is a better way of checking if the user is a "superuser" rather than enlarging the IF statement above. For a normal user, the two sheets named above are "veryhidden" so they can't go into Format/sheets/Unhide.
Any ideas will be greatly appreciated.