lock cells

  • Thread starter Thread starter kaja48380
  • Start date Start date
Right from the Recorder:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 2/22/2008 by James Ravenswood
'

'
Cells.Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("A1").Select
Selection.Locked = True
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
 
Hi,

On your sheet left click the grey box in the top left hand corner of the
sheet (Above Row 1 and to the left of Column A) this selects all cells on the
sheet.

Right click and selct Format Cells then the Protection Tab, uncheck the
Locked box and click Ok.

Select the cell that you want to lock/protect. Right click, Format Cells,
Protection tab and check the Locked box, click OK.

Select the Tools menu from the top of the screen and Protection, the protect
sheet.

Uncheck the Select Locked Cells box.

Enter a password, click ok, enter the passwaord that you used in the
previous step and click ok.

Hope this helps,

Gav.
 
What is it that you want to do? What do you mean when you say "lock a
cell"? That means different things to different people. In Excel, that
means to change the setting of a cell to "Locked". That, by itself, does
not protect the cell. If the sheet is protected, all locked cells are
protected. Post back with more detail about what you have and what you want
to have. HTH Otto
 
Back
Top