Password protect worksheets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I spotted in my travels in this forum that someone referred to 'locking the
sheets' in a workbook. I like the sound of that! So, for instance, in a
workbook with seven sheets, five could be locked leaving two open to all
users.
How would I go about it???
 
You can protect a worksheet via:
tools|Protection|protect sheet

But first you may want to lock or unlock different cells on each of those
worksheets.

Unless you've done something strange, all your cells will be locked. You can
select the cells that you want users to change and then Format|cells|Protection
tab|uncheck locked

Then protect the worksheet. Depending on the version of excel that you're
using, you may see a bunch of options that allow you to let users do stuff with
locked cells on a protected sheet.

But a couple of things to remember: Worksheet protection is easily broken and
there are lots of things that may not work on a protected worksheet. You may
want to do some testing before you share your workbook with others--just to make
sure it works as intended.
 
Hi Dave, thanks.
I have noticed in the past that a protected sheet does indeed have an impact
on formulae and code which try to access it. What I was looking for was
either:
a) a method of 'hiding' tabs which I don't want people to access. This would
mean the sheet could remain unlocked, thus allowing code etc to run without
problems,
b) Code to run when a tab is clicked which will ask for a password before
displaying the sheet. Again the sheet wouldn't need to be locked.
Any ideas?
 
A.
Select the sheets you want to hide.
Format|Sheet|Hide
But the user can use the same technique to unhide those sheets. You can protect
the workbook's structure so that no sheets can be
moved/deleted/inserted/hidden/shown via:
tools|Protection|protect workbook|Check Structure

But be aware that this password is easily broken. And really interested person
can find a way around it.

B.
There's not a real good way to do this. Any solution (that I would use) would
involve macros and macros can be disabled (and events can be disabled, too).

In fact, if you have information that is really private and shouldn't be seen by
others, then excel isn't the application you should use. But if you have to use
excel, then don't share the workbook with anyone you don't trust.


Hi Dave, thanks.
I have noticed in the past that a protected sheet does indeed have an impact
on formulae and code which try to access it. What I was looking for was
either:
a) a method of 'hiding' tabs which I don't want people to access. This would
mean the sheet could remain unlocked, thus allowing code etc to run without
problems,
b) Code to run when a tab is clicked which will ask for a password before
displaying the sheet. Again the sheet wouldn't need to be locked.
Any ideas?
 
The data isn't confidential at all, but rather I don't want people to
'fiddle' around and delete or change things whether inadvertantly or
otherwise!
So I'm going to run with your A. suggestion.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top