code to hide a worksheet?

  • Thread starter Thread starter Paula
  • Start date Start date
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
 
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]
 
Back
Top