Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
restricting access to a worksheet?
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! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
restricting access to a worksheet?
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 = "Unhide " & Sheet1.name Else sPW = Application.InputBox("YOU ARE ATTEMPTING TO OPEN A CONFIDENTIAL FORM, ADMINISTRATIVE RIGHTS ARE REQUIRED, YOU MUST ENTER A PASSWORD TO OPEN THIS DOCUMENT") If sPW = "password" Then Sheet1.Visible = xlSheetVisible sCap = "Hide " & Sheet1.name Else MsgBox "Incorrect Password" sCap = "Unhide Sheet1" End If End If End Sub -------------------- Hope this will help. Larry -- keithl816 ------------------------------------------------------------------------ keithl816's Profile: http://www.excelforum.com/member.php...o&userid=21287 View this thread: http://www.excelforum.com/showthread...hreadid=530211 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
restricting access to a worksheet?
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: http://www.excelforum.com/member.php...o&userid=29130 View this thread: http://www.excelforum.com/showthread...hreadid=530211 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
One worksheet to calulate different items simultaneously | Excel Worksheet Functions | |||
Extracting data from one Worsheet to Another Worksheet with common link value | Excel Discussion (Misc queries) | |||
Macro to search for and display data in another worksheet | Excel Worksheet Functions | |||
Search/Match between 2 x separate Worksheets and populate result in third worksheet | Excel Discussion (Misc queries) | |||
access my data from my master worksheet while calculation is don. | Excel Worksheet Functions |