Esmatullah
12-11-2012, 04:39 AM
Hi dear friends!
How i can edit this macro code of automatic cell locking that don't lock when i double click for editing a cell in range and exit without editing.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B7:D9")) Is Nothing Then Exit Sub
ActiveSheet.Unprotect Password:="Password"
Target.Locked = True
ActiveSheet.Protect Password:="Password"
End Sub
How i can edit this macro code of automatic cell locking that don't lock when i double click for editing a cell in range and exit without editing.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B7:D9")) Is Nothing Then Exit Sub
ActiveSheet.Unprotect Password:="Password"
Target.Locked = True
ActiveSheet.Protect Password:="Password"
End Sub