Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Can I password-protect a spreadsheet for different users?

In short, here is the situation:
An Excel spreadsheet is created with the work scheduals of 20 employees. It
can be sorted (example: "Amy" or "Bob"). The problem is, Amy can see Bob's
schedual and vice versa. Is there a way to prevent employees from seeing any
but their own schedual?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Can I password-protect a spreadsheet for different users?

You could do something similar to this. Have a main sheet that is always
visible. You will want some code in the on on open event to hide all but the
main sheet and the same code in the on close. This will cover off macros
enabled or disabled causing a problem and keep prying eyes generall out of
stuff that they are not supposed to see.

The on open and on close should call this

Sub HideAll()
dim wks as worksheet

for each wks in worksheets
if wks.name < "Main" Then wks.visible = xlVeryHidden
next wks
End sub

In the on open you also want to have code similar to this after the
HideAll()...

on error goto errorhandler
sheet(environ("UserName")).visible = xlVisible

exit Sub
Errorhandler:
msgbox "There is no sheet with your name"
end sub

The only thing left to do is to rename all of the sheets with the individual
employees user names. This is the name that they use to log into windows.

If you need more assistance or if this all sounds to difficult reply back
and we can give you futher help.
--
HTH...

Jim Thomlinson


"Candy" wrote:

In short, here is the situation:
An Excel spreadsheet is created with the work scheduals of 20 employees. It
can be sorted (example: "Amy" or "Bob"). The problem is, Amy can see Bob's
schedual and vice versa. Is there a way to prevent employees from seeing any
but their own schedual?

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
i want to allow users to edit changes afetr password protect of c mamta raul New Users to Excel 1 August 19th 09 03:08 PM
Password Protect Spreadsheet Ziggy Excel Discussion (Misc queries) 1 February 3rd 08 02:11 PM
Large spreadsheet-multiple users-password protected-filtered jeffk Excel Discussion (Misc queries) 2 July 14th 06 01:01 AM
How do I password protect a spreadsheet Laurel New Users to Excel 2 December 30th 05 03:16 PM
How protect with password the access of a spreadsheet ? Manuel Excel Programming 4 August 12th 05 09:32 PM


All times are GMT +1. The time now is 03:54 PM.

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"