ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Stop message to UnProtect (https://www.excelbanter.com/excel-programming/311625-stop-message-unprotect.html)

Lulu[_2_]

Stop message to UnProtect
 
I have a custom template. It has some protected cells.
If the user tries to change the proected cell, he gets the
default Excel message which explains how to Unprotect the
sheet. Since I will be removing Protection as an option
off the Menu used by this template, how do I also turn OFF
this message?

Thanks for any insight.

Ron de Bruin

Stop message to UnProtect
 
Hi Lulu

Which Excel version ?

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Lulu" wrote in message ...
I have a custom template. It has some protected cells.
If the user tries to change the proected cell, he gets the
default Excel message which explains how to Unprotect the
sheet. Since I will be removing Protection as an option
off the Menu used by this template, how do I also turn OFF
this message?

Thanks for any insight.




Jim Thomlinson[_3_]

Stop message to UnProtect
 
Application.displayalerts = false

"Lulu" wrote:

I have a custom template. It has some protected cells.
If the user tries to change the proected cell, he gets the
default Excel message which explains how to Unprotect the
sheet. Since I will be removing Protection as an option
off the Menu used by this template, how do I also turn OFF
this message?

Thanks for any insight.


Dave Peterson[_3_]

Stop message to UnProtect
 
If you protect the worksheet in code, you can make it so the user can't even
select those cells to change them:

With Worksheets("sheet1")
.Protect Password:="hi"
.EnableSelection = xlUnlockedCells
End With

Maybe this should go in the worksheet_activate subroutine -- behind that
worksheet.

But this setting isn't remember if you close the workbook. It has to be run at
least once when you reopen the workbook.

(I bet Ron's point was going to be that there's an option in xl2002+ under
tools|protect sheet for this.)



Lulu wrote:

I have a custom template. It has some protected cells.
If the user tries to change the proected cell, he gets the
default Excel message which explains how to Unprotect the
sheet. Since I will be removing Protection as an option
off the Menu used by this template, how do I also turn OFF
this message?

Thanks for any insight.


--

Dave Peterson



All times are GMT +1. The time now is 03:48 AM.

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