ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Turning Off Protection Notification (https://www.excelbanter.com/excel-discussion-misc-queries/106266-turning-off-protection-notification.html)

Chaplain Doug

Turning Off Protection Notification
 
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.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org

Dave Peterson

Turning Off Protection Notification
 
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.

Chaplain Doug wrote:

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.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


--

Dave Peterson

Chaplain Doug

Turning Off Protection Notification
 
Thank you for the help Dave. God bless.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


"Dave Peterson" wrote:

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.

Chaplain Doug wrote:

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.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


--

Dave Peterson



All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com