How do I lock a cell in Excel after a drop down list entery
You could use a variation of this. One way (thought probably not foolproof)
is to change the locked property of the cell from FALSE to TRUE when the cell
is
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myResponse As String
If Target.Count 1 Then Exit Sub
Do
myResponse = InputBox("Are you sure your entry is correct? Enter Y or
N.")
Loop While LCase(myResponse) < "y" And LCase(myResponse) < "n"
If LCase(myResponse) = "n" Then Exit Sub
Target.Parent.Unprotect
Target.Locked = True
Target.Parent.Protect
End Sub
Every time there's an entry, the user will need to ensure that the value is
correct before the cell is locked. I don't like it, but it's a starting
point.
--
HTH,
Barb Reinhardt
"Casey" wrote:
I have created a spreadsheet in which I have several "drop down lists", I
would like to lock the cell once a selection from the drop down list has been
made. This is to prevent any changes by others who will have access to the
spreadsheet. Any suggestions would be helpful....Thanx....Casey
|