Consulting

Results 1 to 5 of 5

Thread: Multiple User sheet protection and access

  1. #1

    Multiple User sheet protection and access

    I am using a WB which gives access to certain sheets to certain users.However the code I have (Found during net search) give access to only one sheet to one user. I need some modification to it.

    As in the attached file you will see the user name and password is written in the respective fields and also the sheet names. For sheet names (to be separated by comma or any other suitable method) I want to incorporate more sheets for some users.

    Suppose say, user 1 will access to sheet1, sheet2 and so on.

    Can someone please help me in soving the problem?

  2. #2
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    Ok, my two cents worth. First of all the security in Excel is pretty easily broken. There are many ways and methods to bypass it. Just Google it and see what I mean.

    So, this may be an excersize in futility. JMHO.

  3. #3
    Thanks for the reply THis I know that security in excel is a joke but the persons with whom I will work does not have so much knowledge to berak the password be it Sheet pwd or VBA pwd. And it is done not to combat fraud but a simple checking measure. So I wnat some minor modification to the code so that I can allow some sheets to some users. the code that I have given allows only one sheet per user, modification needed to allow more than one sheet to some users as will be set in the sheet.

  4. #4
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    Why dont you protect the whole workbook, then using a workbook open event, present a box asking for a password. Depending on what the password entered is, use something like a Select Case statement to unprotect the sheets you want. Of course you would need a workbook close event to protect the whole workbook before close.

    This might get cumbersome if you want to change the passwords a lot though because you would have to hard code them in your VBA.

    Probably other ways to do it though.

  5. #5
    VBAX Contributor
    Joined
    Jul 2004
    Location
    Gurgaon, India
    Posts
    148
    Location
    Quote Originally Posted by sujittalukde
    Thanks for the reply THis I know that security in excel is a joke but the persons with whom I will work does not have so much knowledge to berak the password be it Sheet pwd or VBA pwd. And it is done not to combat fraud but a simple checking measure. So I wnat some minor modification to the code so that I can allow some sheets to some users. the code that I have given allows only one sheet per user, modification needed to allow more than one sheet to some users as will be set in the sheet.
    See here

Posting Permissions

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