1.First select all cells (Ctrl + A) on worksheet
2.Right Click & Go to Format cells
3.Select Protection Tab
4.uncheck Locked
5.Right Click on sheet tab & select view code
6.Paste below code
Private Sub Worksheet_Change(ByVal Target As Range)
Const pw As String = "password"
With Me
.Unprotect pw
Target.Locked = True
.Protect pw
End With
End Sub
No comments:
Post a Comment