Code is here
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
#autolock #dataentry #entryrestricted
Important Links
Our You Tube channel
https://www.youtube.com/c/VIKOMINSTIT...
Our LinkedIn channel
/ exceltricksvikaljain8a011087
Instagram link
/ tricksexcel
Telegram link
t.me/exceltricks1
Excel group links
/ tricksexcel
Twitter link
/ vikal10000
Wanna Paid courses
Contact whatsapp +919213331108 or email [email protected]