Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Worksheet_Change(ByVal Target As Range)
- If Range("A1").Value = "Car" Then
- Range("B1").Locked = False
- Else
- Range("B1").Locked = True
- End If
- End Sub
- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim rng As Range
- Set rng = Intersect(Range("A1:A10"), Target)
- If rng Is Nothing Then
- ' Not updating the range we care about
- Exit Sub
- Else
- rng.Offset(0, 1).Locked = ... whatever ...
- End If
- End Sub
- Private Sub Worksheet_Change(ByVal Target As Range)
- If Range("A1").Value = "Car" Then
- Range("B1").Locked = False
- Me.Unprotect ("password")
- Else
- Range("B1").Locked = True
- Me.Protect ("password")
- End If
- End Sub
Add Comment
Please, Sign In to add comment