Protected Sheet Message

T

tlosgyl3

Excel has a default message that appears when someone tries to change a
protected sheet. Can this message be edited to something more helpful.

I know that I can do this using Data/Validation but this doesn't work
on a Protected Sheet with all cells locked
 
D

Dave Peterson

You can't change the message, but you can stop them from selecting locked cells
on a protected sheet.

Option Explicit
Sub auto_open()
Dim wks As Worksheet
Set wks = Worksheets("sheet1")
With wks
.Protect password:="hi"
.EnableSelection = xlUnlockedCells
End With
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Top