[quote='Gord Dibben[_2_];1603079']First...........select all cells on sheet and format them to unlocked.
Add this event code to the worksheet module.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 3 Then
ActiveSheet.Unprotect Password:="justme"
n = Target.Row
If Me.Range("C" & n).Value < "" Then
Me.Range("C" & n).Locked = True
End If
End If
enditall:
ActiveSheet.Protect Password:="justme"
Application.EnableEvents = True
End Sub
When you enter a value in column C that cell will become locked for
editing.
Gord
Hello Gord,
The cells I want to lock are already unlocked in a protected worksheet and the above code works perfect for column C. I have a need to do the same thing on columns A thru N. How is the above code modified to do this?
Many thanks,
Jim
|