happyhungarian
Active Member
- Joined
- Jul 19, 2011
- Messages
- 254
- Office Version
- 365
- Platform
- Windows
Hi, I'm trying to lock down a cell if the value in another cell equals a certain value. I have the following code but get the error "Run-time error '1004': Unable to set the Lock property of the Range class"
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("F4") = "Lock" Then
Range("F16").Locked = True
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("F4") = "Lock" Then
Range("F16").Locked = True
End If
End Sub