Turning Off Protection Notification

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Excel 2003. I am producing a worksheet that is protected. However, I do not
want to see the warning about a protected cell everytime someone tries to
type in it. Instead, I simply want them not to be able to type. The message
I am getting and do NOT want is:

The cell or chart you are trying to change is protected and therefore
read-only

Again, how do I make it so that the message does not come up, but that
people simply cannot type in or change the sheet or protected cells? Thanks
for the help.
 
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

Excel doesn't remember this setting--so the code uses the auto_open procedure to
set it each time the workbook opens.
 
Back
Top