Thread: Possible?
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Possible?

Private Sub Workbook_Open()
Worksheets("Sheet1").Activate
worksheets("Sheet1").Cells
.Locked = True
.FormulaHidden = True
.Protect DrawingObjects:=True, _
Contents:=True, Scenarios:=True
.Parent.EnableSelection = xlNoSelection
End With
End Sub

--
Regards,
Tom Ogilvy


B. Wassen wrote in message
...
Tom,

It looks like this right now :

Private Sub Workbook_Open()

Selection.Locked = True
Selection.FormulaHidden = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,

Scenarios:=True

End Sub

But when I open Excel it gives an error at Selection.Locked = True


Ben