Freeze Cell Once Information is Entered

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to automatically freeze a cell after information has been entered and
saved. Once the information is saved I don't want people to be able to go
back into that cell and make changes. Is that possible?
 
Suzie,

A couple of steps. First remove the locked checkmark from the cells you want
to allow editing in (in the example below A1:A10) and then protect the
worksheet. Right click the sheet tab, view code and paste this in :-

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
ActiveSheet.Unprotect Password:="mypass"
Target.Locked = True
ActiveSheet.Protect Password:="mypass"
End If
End Sub

Cells in the range A1:A10 will become protected after data are entered into
them

Mike
 
Back
Top