Is there a way to prevent a specific sheet in the wb from hiding?

J

Juchelka

The sheet is un-hidden and I don't want user's to hide it (by
accident). I also have a code in activate event of the sheet. I was
looking at protecting the sheet, but it does not disable hiding... Any
ideas? Thanks!
 
B

Bob Greenblatt

The sheet is un-hidden and I don't want user's to hide it (by
accident). I also have a code in activate event of the sheet. I was
looking at protecting the sheet, but it does not disable hiding... Any
ideas? Thanks!
You can prevent it from being hidden by protecting the workbook.
 
J

JE McGimpsey

Juchelka said:
Well, I have other sheets in the wb, that I want users to be able
hide/unhide...

Since hiding a sheet fires the Worbook_Deactivate event, you could use
this (in the ThisWorkbook module):

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Sheets("Sheet1").Visible = True
End Sub
 
J

Juchelka

Thank you again, JE! It is a workaround - you cannot prevent someone
from attempting to hide a sheet, but very acceptable workaround : ),
and it indirectly lead me to more efficient sub execution methods...

AJ
 

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