View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Error message with protected sheet

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

HRman wrote:

hello,

is there any way I can change the error message that comes up when a user
tries to change a locked cell on a protected worksheet.

Thanks


--

Dave Peterson