PDA

View Full Version : Multiple User sheet protection and access



sujittalukde
07-31-2007, 05:36 AM
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?

austenr
07-31-2007, 07:35 AM
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.

sujittalukde
08-01-2007, 12:02 AM
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.

austenr
08-01-2007, 07:14 AM
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.

Krishna Kumar
08-02-2007, 03:22 AM
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 (http://www.ozgrid.com/forum/showthread.php?t=73749)