Hey Everyone,
Im running into a little bit of a problem. I have a cell set up with an if statement that will return the value 1 or 0. What I am trying to accomplish is that once the value becomes 1 it will lock a portion of the worksheet. if the value were to change back to 0 it would then unlock the portion of the worksheet. Here is the code I am working with. I am no longer recieving any errors, but the code doesnt appear to be doing anything. Any suggestions would be greatly appreciated. Thanks!
![]()
Private Sub Worksheet_Change(ByVal Target As Range) Select Case [v25] Case 1: If ActiveCell.Value = 1 Then Range("B7:N70") = Target Target.Locked = True Application.EnableEvents = True Me.Protect ("ppppp") Else Select Case [v25] Case 0: If ActiveCell.Value = 0 Then Target.Locked = False Me.Unprotect ("ppppp") Application.EnableEvents = False End If End Select End If End Select End Sub
Bookmarks