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
(e-mail address removed)
for each c in selection
if c.hasformula then
next c
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.