Lock/unlock all the cells you want. But leave some cells unlocked in your
column (where the user can make changes).
Then protect the worksheet.
Then this code may work the way you want:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myRng As Range
Dim myCell As Range
Set myRng = Me.Range("c:C")
If Intersect(Target, myRng) Is Nothing Then
Exit Sub
End If
Me.Unprotect Password:="hi"
For Each myCell In Target.Cells
If myCell.Value = "" Then
'do nothing
Else
myCell.Locked = True
End If
Next myCell
Me.Protect Password:="hi"
End Sub
Thanks. To be more specific, I have a spreadsheet that has input into 7
different columns and I want only one column to be protected so that once the
data is entered, it cannot be changed. (I was successful at this based on
the directions below) However, I would like the other columns to be able to
be changed going forward. In the code you provided below, can there be a
range specified that the code would apply to only and not impact the rest of
the spreadsheet?