close

I am using Excel 2000. I have a spreadsheet on a server that can be accessed
by approximately 50 people. There are 2 worksheets in this document that
contain sensitive information and I want to limit access to these worksheets
to only to a few users exclusively. Can this be done? Thanks!


How about require a user to enter a password.

This code will hide/unhide a sheet as needed. When you click on the
button it will prompt you for a password then open if correct, when you
click it again it will rehide the sheet.

Add a command button to a sheet and then right click it, click on view
code and place this code into it. Make sure to change the command
button name/number as needed and also change the sheet name/number
accordingly. just make sure to password protect the VBA Project in the
VBE so that the user cannot look at the code for the password.Code:
--------------------

Private Sub CommandButton1_Click()
If Sheet1.Visible = xlSheetVisible Then
Sheet1.Visible = xlSheetVeryHidden
sCap = quot;Unhide quot; amp; Sheet1.name
Else
sPW = Application.InputBox(quot;YOU ARE ATTEMPTING TO OPEN A CONFIDENTIAL FORM, ADMINISTRATIVE RIGHTS ARE REQUIRED, YOU MUST ENTER A PASSWORD TO OPEN THIS DOCUMENTquot;)
If sPW = quot;passwordquot; Then
Sheet1.Visible = xlSheetVisible
sCap = quot;Hide quot; amp; Sheet1.name
Else
MsgBox quot;Incorrect Passwordquot;
sCap = quot;Unhide Sheet1quot;
End If
End If
End Sub
--------------------Hope this will help.

Larry--
keithl816
------------------------------------------------------------------------
keithl816's Profile: www.excelforum.com/member.php...oamp;userid=21287
View this thread: www.excelforum.com/showthread...hreadid=530211
Just a word of warning, it is relatively easy for anyone, even a novice,
to get around passwords in Excel. Just do a quick google for examples.
So, if it's info that others should definitely not see then the safest
option is not to put it out there.

I am facing the same issue at the moment, I have built a workbook and I
need to protect it, more so that other people don't screw it up than
anything else!--
mevetts------------------------------------------------------------------------
mevetts's Profile: www.excelforum.com/member.php...oamp;userid=29130
View this thread: www.excelforum.com/showthread...hreadid=530211

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()