code to hide a worksheet?

P

Paula

Can VBA code be written to hide a worksheet? I can't seem to find any
help in the help about this...

Thank you much,

Paula
 
J

Jake Marx

Hi Paula,

Yes, you can change the Visible property of the Worksheet object:

Worksheets("Sheet1").Visible = xlVeryHidden

'/ or

Worksheets("Sheet1").Visible = xlHidden

xlVeryHidden will hide the sheet so that it may not be unhidden via Format |
Sheet from Excel. xlHidden will hide it just as if you had hidden it via
Format | Sheet --> Hide.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 

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