AUTOMATIC LOCK
![](https://static.xx.fbcdn.net/images/emoji.php/v9/t4c/1/16/1f642.png)
![](https://static.xx.fbcdn.net/images/emoji.php/v9/t4c/1/16/1f642.png)
by VIkal Jain sir
CODE TO COPY AND PASTE
Private Sub Worksheet_Change(ByVal Target As Range)
Dim xRg As Range
On Error Resume Next
Set xRg = Intersect(Range("A1:E15"), Target)
If xRg Is Nothing Then Exit Sub
Target.Worksheet.Unprotect Password:="1234"
xRg.Locked = True
Target.Worksheet.Protect Password:="1234"
End Sub
Ref: Vlkal Jain
0 comments:
Post a Comment