+ Reply to Thread
Results 1 to 6 of 6

Sheet Viewing Restriction for Certain Users

  1. #1
    Registered User
    Join Date
    02-21-2019
    Location
    USA
    MS-Off Ver
    2016
    Posts
    13

    Sheet Viewing Restriction for Certain Users

    I am attempting to create a workbook with some restricted access. The way I would like it is having the "Menu" worksheet having a dropdown list of names. When a user chooses their name, it prompts them for a password.

    For example

    Jane selects her name from the dropdown list, it prompts her for a password. She enters her password correctly and Sheet2 and Sheet5 only shows up for her.
    John selects his name from the dropdown list, it prompts him for a password. He enters his password correctly and Sheet3 and Sheet6 only shows up for her.
    Administrator selects Administrator from the dropdown list and it prompts them for a password, they type in their password and all sheets show up for them.

    My supervisor asked for an alternate way of protecting a workbook. He didnt want the Administrator typing in a password for each sheet when they want to access it. Is this possible?

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Sheet Viewing Restriction for Certain Users

    Try this code. It goes into the worksheet module of the master sheet:
    Please Login or Register  to view this content.
    and off course,you need to use your sheet names and dropdown. Also, you should protect your code with a password
    Click the * to say thanks.

  3. #3
    Registered User
    Join Date
    02-21-2019
    Location
    USA
    MS-Off Ver
    2016
    Posts
    13

    Re: Sheet Viewing Restriction for Certain Users

    Quote Originally Posted by PaulM100 View Post
    Try this code. It goes into the worksheet module of the master sheet:
    Please Login or Register  to view this content.
    and off course,you need to use your sheet names and dropdown. Also, you should protect your code with a password
    Thank you very much for this! But I ran into this error after, did I do anything wrong?

    error1.PNGerror2.PNG

  4. #4
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Sheet Viewing Restriction for Certain Users

    Change "Dim pswd as String" to "Dim pwd as String"

  5. #5
    Registered User
    Join Date
    02-21-2019
    Location
    USA
    MS-Off Ver
    2016
    Posts
    13

    Re: Sheet Viewing Restriction for Certain Users

    Quote Originally Posted by Melvosh View Post
    Change "Dim pswd as String" to "Dim pwd as String"
    Awh embarrassing! Doh! Thank you!

  6. #6
    Registered User
    Join Date
    02-21-2019
    Location
    USA
    MS-Off Ver
    2016
    Posts
    13

    Re: Sheet Viewing Restriction for Certain Users

    After saving, closing, and opening again, it looks like the workbook opens from the last logon instead of the default Login Worksheet, is there a way to open the workbook at the login sheet every time its opened?

+ 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. Replies: 0
    Last Post: 08-03-2018, 10:43 AM
  2. Replies: 2
    Last Post: 10-22-2016, 05:04 PM
  3. Replies: 1
    Last Post: 03-09-2014, 05:43 PM
  4. [SOLVED] restrict certain users from viewing hidden data
    By spimturn in forum Excel General
    Replies: 5
    Last Post: 07-24-2012, 11:25 PM
  5. Excel Spreadsheet Refresh for multiple viewing users
    By Surge89 in forum Excel General
    Replies: 1
    Last Post: 10-18-2011, 03:01 PM
  6. [SOLVED] I dont need the Restriction when viewing my documents, yet it is
    By Adejumo in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-02-2006, 10:10 AM
  7. NOT allow users to save XLS file when viewing over web
    By BG in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-21-2005, 02:02 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