View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
caroline caroline is offline
external usenet poster
 
Posts: 10
Default Hiding and protecting sheet without crashing Excel!

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