I received this question from Lisa:
I have information I need in my workbook (on a separate sheet), but I don't want users to be able to see this data. I know they can figure out some of the numbers by formula results, but I can't allow this information to be blatantly displayed in the workbook. Is there a way to easily hide and unhide the sheet so others can’t see?
Lisa, you'll want to use some sort of password protection to accomplish this. You’d select the sheet with the data and then hide the sheet (Format, Sheet, Hide). You can then protect the workbook after you've hidden the sheet (Tools, Protection, Protect Workbook). Use the password option when you do this. Then to unhide the sheet, unprotect the workbook using your password (Tools, Protection, Unprotect Workbook), then unhide the sheet (Format, Sheet, Unhide).
If you need to be able to unhide quickly for yourself, you can use VB code with the password embedded in the code. If this code is in the workbook, you'll want to use a private sub and password protect your VB code so no one else can use it or see your password, but it would be better to just keep it in a separate workbook or in your personal macro workbook. I've also used code to hide and unhide sheets for users in my budget workbooks, so that a sheet becomes viewable when they need to use it and then “goes away” when they are done.
If you would some of the VB code please post a comment and I will post that, too.
Wednesday, October 8, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment