How can you effectively hide a worksheet?

W

Will Fleenor

How do you effectively hide a worksheet when you are distributing an Excel
workbook for someone to review or make additions to. You can use the
Format - Sheet - Hide command to hide a sheet and with Workbook protections
turned on the sheet can not be unhidden. However, if the person discovers
the name of the hidden sheet they can easily build formulas to extract all
of the information from the hidden sheet to a new blank sheet. How can you
effectively hide a worksheet?



Thanks, Will
 
D

Don Guillett

It would help to use vba code to set to xlveryhidden. Then, it can only be
unhidden by code. You may also want to protect your code.
 
J

JE McGimpsey

There's not much you can do to really hide the worksheet from anyone
who's more than a rank novice...

You can use code to set the worksheet's .Visible property to
xlVeryHidden:

Sheets(5).Visible = xlVeryHidden

That way it won't appear in the list of worksheets. You then need to
both use a VBA password to prevent discovery in the VB Editor, and you
need to protect your formulas by choosing Format/Cells/Protection and
checking the Hidden button, then protecting the worksheets.

The real problem, however, is that worksheet (and workbook) protection
is nearly worthless:

http://www.mcgimpsey.com/excel/removepwords.html

Even were that not the case, the VBA password provides no protection
against commercial attack (or a knowledgeable user).

And even if your users were unable to find these newsgroups to find
these methods, a simple scan of the file by a hex editor will reveal all
your sheet names, as well as your formulae (tokenized, but somewhat
readable).
 

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

Top