Kristi,
I was going to offer to have you send workbook to me to look over, but Gord
has beaten me to that offer, and I think to keep confusion to you to a
minimum it's probably best to work with just one mentor - in this case, I'll
defer to Gord, so go ahead and get in touch with him. I can't imagine either
of you needing me from this point, even though he doesn't sell insurance,
"You're in good hands with Gord" <g>, but if you do, just reply to this and
I'll be back.
:
Nothing happened. I'm sure I am not doing something right, I just don't know
what.
:
To put code in a worksheet's event handlers, right-click on the worksheet's
name tab and choose View Code from the popup list. You can choose Worksheet
from the left hand pull down at the top, and which event from the right hand
pull down list. You'll have a 'stub' for _SelectionChange() which you can
delete. In the case of the code I pointed to, you wouldn't need the
pull-downs, just copy and paste the code into that module. Note that you
have to do this for each worksheet, and of course modify the code to use the
appropriate password for it.
To get to where you need to be for the solution that Gord has offered,
right-click on the Excel icon immediately to the left of the word "File" in
the main Excel menu toolbar and again, choose [View Code] from that popup
list and copy/paste his code if you choose to go that route.
:
How/where do I insert the code on the separate worksheets? Can it be the
same password as the data locked password?
:
Each worksheet can have a unique password. All you have to do is assign that
password to the sheet. Of course you also have to remember what the password
is for each of the sheets.
As long as the people using the workbook are 'honest' and all you're
interested in doing is keeping users from accidentally altering someone
else's data or using the wrong sheet, then things are fine. But remember
that the encryption of the password for both workbook and worksheet
protection is very weak and easily cracked - so it's not much for providing
true 'security' type protection.
You could put code in each worksheet's _Activate() event to prompt for its
password, and if the proper password isn't given, leave the sheet locked up.
Another person posting a question about this kind of thing had such a deal
set up: when you activated a sheet, it first hid all of the columns on that
sheet and requested the password. If the proper password wasn't given, then
the columns remained hidden (and the sheet remained protected), but if the
proper password was given, then the columns were made visible and sheet
protection was removed. The sheet's _Deactivate() event handler was set up
to always put the sheet back into protected state with the columns hidden
again.
Here's a link to their initial posting that shows the code they used in the
two worksheet events:
http://www.microsoft.com/office/com...misc&mid=509614b1-4e94-49e6-b95f-4da09fdbbed5
:
I have a shared document that needs to be set up so that individuals can
access only the worksheet for them (no others) as well as protected cells
within that worksheet. I have set the passwords for the sheets as far as the
data is concerned, but is it possible to protect each worksheet with an
additional password or can only one password be used per worksheet? The
trouble is that one individual could/would enter data on anothers worksheet.