Hiding and protecting sheet without crashing Excel!

  • Thread starter Thread starter caroline
  • Start date Start date
C

caroline

Hi,
I would like to hide a sheet and protect it at the same
time.
Excel crashes if I use the "hide" menu and then write the
following code in the Sub Workbook_Open():
With Worksheets("sheet1")
.EnableSelection = xlUnlockedCells
.Protect Contents:=True, Password:="xxx",
DrawingObjects:=True, UserInterfaceOnly:=True
End With

Any suggestion? Thanks
 
Set the worksheet's .Visible = 2

That will make the sheet "Very" hdden. It won't even show up on th
unhide menu.

Does that work for you? - Piku
 
Back
Top