excel_nubie
New Member
- Joined
- Jan 19, 2009
- Messages
- 9
I got the below code from Mr. Excel to protect a cell with data from being overwritten. I also had to highlight all cells & select format, cell, protection & uncheck locked. It works beautifully. I'm so psyched!! The next step is to customize the error message. Can someone help me with this? Many thanks!!
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect "password"
Target.Locked = True
ActiveSheet.Protect "password"
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect "password"
Target.Locked = True
ActiveSheet.Protect "password"
End Sub