Protect Cell automatically

  • Thread starter Thread starter shah
  • Start date Start date
S

shah

Hi to all
I have worksheet with more of function. is it possible to
protect cell where ever their is function in cell
automatically.

thanks in advance.

Shah
 
record this with macro recorder

[F5] (goto dialog)
Special (button)
Formulas (radio)
(+4 checkboxes CHECKED)
ok (button)

ctrl F1 (cell properties dialog)
protection (tab)
locked (check)
ok (button)



and add a line to make sure the other cells are not locked.

This is the result..

Sub Macro1()
Cells.Locked = False 'this was manually added
Selection.SpecialCells(xlCellTypeFormulas, 23).Select
Selection.Locked = True
Selection.FormulaHidden = False
End Sub

now turn on sheet protection and you're done.


keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
Back
Top