Hi,
I am using this code to protect all non-blank cells.
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.EnableSelection = xlUnlockedCells
If Target <> "" Then
Unprotect
Target.Locked = True
Protect
End If
End Sub
I set up the protection so that the user can't select the protected cells. However, if I save and close the file, and reopen it, the cells are still protected, but the user can select them (but not change). Can I stop this from happening?
Thanks.
I am using this code to protect all non-blank cells.
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.EnableSelection = xlUnlockedCells
If Target <> "" Then
Unprotect
Target.Locked = True
Protect
End If
End Sub
I set up the protection so that the user can't select the protected cells. However, if I save and close the file, and reopen it, the cells are still protected, but the user can select them (but not change). Can I stop this from happening?
Thanks.