+ Reply to Thread
Results 1 to 3 of 3

user form to log in and access different worksheets of workbook depending on log in name

  1. #1
    Registered User
    Join Date
    07-28-2013
    Location
    southampton, england
    MS-Off Ver
    Excel 2010
    Posts
    39

    user form to log in and access different worksheets of workbook depending on log in name

    Hi
    New here. Trying to find out how to create a userform to allow different users to access different worksheets of the workbook. I have seen this type of thing on a different forum but cannot get it to link to a userform? Hope im making sense:

    username password sheet 1 sheet 2 sheet 3
    abloggs 1234 x x
    bsmith 5678

    x

    this somehow links to a user form so the user who enters their username and password only sees the relevant worksheets?

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: user form to log in and access different worksheets of workbook depending on log in na

    Hi
    Firstly you don't need a userform to select a sheet. What I suggest you do is create a Master Sheet at the front of your workbook and create Hyperlinks to each sheet in your workbook.
    Then on each of the remaining worksheets right-click on the tab name and select View Code. Then past this code in each sheet:

    Private Sub Worksheet_Activate()
    a = InputBox("Please Enter Password")
    If a <> "password" Then ' Change the here password to suit your needs for each sheet
    MsgBox "You entered the wrong Password you will be returned to the main page."
    Sheets("Main Page").Select ' Change the title in brackets here to the correct name for your main sheet.
    End If
    End Sub

  3. #3
    Registered User
    Join Date
    07-28-2013
    Location
    southampton, england
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: user form to log in and access different worksheets of workbook depending on log in na

    Thanks for this - its a neat simple solution but i have about 15 worksheets in my workbook and navigate between them frequently. Its a bit of a pain having to enter a password every time to open a sheet and also one can see a fair bit of the sheet before entering the password so its not exactly what I want but I may use elsewhere - thanks again
    Nigel

+ 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. Relational User Form on Access 2010?
    By jammy1812 in forum Access Tables & Databases
    Replies: 2
    Last Post: 01-15-2013, 10:04 AM
  2. Replies: 8
    Last Post: 10-05-2011, 05:11 AM
  3. Access an pre formatted excel through user form
    By taylor.m in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2011, 06:29 PM
  4. Mutli-user form access
    By joenewman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-27-2009, 03:35 AM
  5. Using Worksheets from User Form
    By banquo_ws in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2006, 05:50 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