KP_SoCal
Board Regular
- Joined
- Nov 17, 2009
- Messages
- 116
I'm using the code below to protect a range of cells. It allows end users to select a protected cell within range of A1:A10. If the end user attempts to edit the cell, Microsoft's standard message box will fire,
"The cell or chart you are trying to change is protected and therefore read-only..."
What I would like to do is replace Microsoft's default message with my own custom message. Any ideas?
"The cell or chart you are trying to change is protected and therefore read-only..."
What I would like to do is replace Microsoft's default message with my own custom message. Any ideas?
Code:
Public Sub ProtectAllSheets()
Dim N As Single
Sheets("Sheet1").Select
Application.ScreenUpdating = False
For N = 1 To Sheets.Count
With Sheets(N)
.Cells.Locked = False
.Range("A1:A10").Locked = True
.Protect
End With
Next N
Application.ScreenUpdating = True
End Sub
Last edited: