Hide Sheet

  • Thread starter Thread starter dipsy
  • Start date Start date
D

dipsy

I want to hide a sheet in a workbook. The sheet should be
visible only when I type a password. Is there a way to do
this. Does this need to be done through VBA.

Thanks in advance.
 
Dipsy,

You can protect the workbook. Tools - Protection - Protect Workbook. This
will disallow adding, moving, deleting sheets also though.

Or use this code:
Sheets("Sheet2").Visible = xlVeryHidden

A user won't be able to use Format - Sheets - Unhide. Only code can unhide
it. This doesn't require that the workbook be protected.
 
dipsy,

Open the VBA Editor. (Alt + F11)
Open the "Properties" window (F4)
Select the sheet you want hidden in the "Projects" Window (upper left)
Change the "Visible" property of the sheet to "VeryHidden" (lower left)
Then select
Tools/VBA ProjectProperties
Protection tab
Check "Lock Project for viewing"
Enter passwords
Save the file.

John
 

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