Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
C.East
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
keithl816
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
mevetts
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
One worksheet to calulate different items simultaneously John Excel Worksheet Functions 4 November 28th 05 07:07 PM
Extracting data from one Worsheet to Another Worksheet with common link value Edwin Mashiringwani Excel Discussion (Misc queries) 1 November 25th 05 03:14 AM
Macro to search for and display data in another worksheet Mark H Excel Worksheet Functions 0 June 14th 05 12:40 PM
Search/Match between 2 x separate Worksheets and populate result in third worksheet Alan Bartley Excel Discussion (Misc queries) 1 April 11th 05 05:21 AM
access my data from my master worksheet while calculation is don. Kannan.Iyer Excel Worksheet Functions 1 April 6th 05 01:23 AM


All times are GMT +1. The time now is 03:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"