+ Reply to Thread
Results 1 to 3 of 3

How to restrict access to worksheets per user

Hybrid View

  1. #1
    Registered User
    Join Date
    04-09-2013
    Location
    Richmond Hill, Canada
    MS-Off Ver
    Excel 2003
    Posts
    6

    How to restrict access to worksheets per user

    Hello All,
    Can somebody look at my code and advise what is wrong with my code?

    Regards,
    Taha
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527

    Re: How to restrict access to worksheets per user

    Hi Taha,

    The syntax for the case statement should be like this:

    Select Case Environ("Username")
        Case Is = "Sunj"
            Set GetAllowedSheet = Sheets("Sheet7")
        Case Is = "AbisoyeM"
            Set GetAllowedSheet = Sheets("Sheet9")
    End Select
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,982

    Re: How to restrict access to worksheets per user

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Restrict view of worksheets by user
    By scooterboygnu1 in forum Excel General
    Replies: 1
    Last Post: 09-16-2013, 09:42 AM
  2. Replies: 2
    Last Post: 07-29-2013, 12:18 PM
  3. vba excel user form restrict input on user textbox
    By samz93 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-04-2013, 04:38 PM
  4. Replies: 0
    Last Post: 01-21-2013, 12:47 PM
  5. [SOLVED] how do I restrict access to only one worksheet in excel?
    By Avinash in forum Excel General
    Replies: 6
    Last Post: 08-03-2012, 07:54 AM
  6. Replies: 2
    Last Post: 03-28-2009, 12:09 AM
  7. Restrict Access to Workbook
    By nguyeda in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-26-2009, 06:23 AM
  8. [SOLVED] Restrict access to certain sheets
    By Jelinek in forum Excel General
    Replies: 3
    Last Post: 05-11-2006, 03:15 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