Locking/Unlocking cells upon condition
I have put the following code into the worksheet code but it doesn't work.
Can someone put me straight please?
Private Sub PERSONAL_LOCK()
If Range("add.years.1").Value < 3 Then
ActiveSheet.UNPROTECT
ActiveSheet.Range("add.prv.1:add.prv.yrs.2").Locke d = False
ActiveSheet.Protect
End If
End Sub
Thanks, Brett
|