+ Reply to Thread
Results 1 to 7 of 7

Show / Hide specific sheets per username

  1. #1
    Registered User
    Join Date
    04-24-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Show / Hide specific sheets per username

    Hi all,

    I'm trying to only show specific sheets per user using the environ variable and this code seems to work for the single user / sheet but the master user does not function correctly i.e. the code does not show all sheets, this is the code I am using:

    Please Login or Register  to view this content.
    Does anyone know why the above code does not respect the Master User "Jane" should be able to see all sheets?



    Original source for this code was found here:

    HTML Code: 
    Last edited by byte; 03-10-2014 at 06:13 PM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Show / Hide specific sheets per username

    I have not checked the rest ** the code, but if it works with other users, just add the blue parts to show all sheets to Masteruser

    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    04-24-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Show / Hide specific sheets per username

    Hi Kaper,

    Thanks but this doesn't affect anything i.e. doesn't respect the master user chosen.

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Show / Hide specific sheets per username

    First question is about Jane ;-)
    Have you tried:
    Please Login or Register  to view this content.
    Does it show exactly
    HTML Code: 
    if not - correct the code.
    May be Ucase or Trim is needed.

  5. #5
    Registered User
    Join Date
    04-24-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Show / Hide specific sheets per username

    Hi Kaper,

    Thanks again for your reply. Yes, I have double, triple checked the username and it does show Jane, I have also tried with UCase...

    Please Login or Register  to view this content.
    But the code still does not show all sheets to master user

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Show / Hide specific sheets per username

    Sorry to say so - the problem is not just with the code - it is probably elsewhere.
    You have shown no sample workbook so hard to judge.
    Try the attached and compare yourself the differences.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-24-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Show / Hide specific sheets per username

    Thanks Kaper, not sure how or why but I copied the code from your sample (sorry about the no sample on my side) and this worked in my workbook...again I am not so sure why but maybe I had a slight code error in my original :~

    Thanks again Kaper

  8. #8
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Show / Hide specific sheets per username

    I am glad to hear that. It is good time to mark thread as solved.
    See http://www.excelforum.com/forum-rule...rum-rules.html how to do it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Username and Password Form - Show Username in Sheet
    By ryan180 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2013, 07:06 PM
  2. Restrict HIDE / UNHIDE sheets by Username
    By coreytroy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-24-2012, 11:47 PM
  3. Using Userform to Hide/Show specific Sheets in Work Book
    By Craigs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2011, 05:40 AM
  4. Use checkbox to show/hide sheets?
    By Zheno in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-03-2010, 02:49 PM
  5. Hide then show specific column
    By littleandyjai in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 02-14-2010, 07:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1