View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default Automatically lock cells and hide formulas

Something like the code below in the Workbook_open() event will do

Private Sub Workbook_Open()
Dim wks As Worksheet
For Each wks In Me.Worksheets
With wks
.Cells.Locked = True
.Cells.FormulaHidden = True
.Protect Password:="abcd"
End With
Next wks
End Sub


--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Qaspec" wrote in message
...
I'd like to set the cell format properties to "lock" and "hide" any
formulas
entered into the cells and protect each sheet when my workbook is opened.