Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet protection
The code below is what I want to use to protect my worksheets (if a certain
condition is met) Everything works well in that the Protect sub prevents the selection of any cells. My problem is with the UnProtect routine. When it runs it asks for a password (which I would prefer not to have) and it displays each worksheet as it runs. When the Protect code runs it does not display each worksheet yet each one is protected. Dim Shts As Worksheet Sub UnProtectAllSheets() Shts.Unprotect Next End Sub Sub ProtectAllSheets() For Each Shts In ThisWorkbook.Worksheets Shts.Protect EnableSelection = xlNoSelection Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Worksheet Protection | Excel Discussion (Misc queries) | |||
Worksheet protection | Excel Discussion (Misc queries) | |||
Cell Protection vs. Worksheet Protection | Excel Discussion (Misc queries) | |||
Worksheet protection is gone and only wokbook protection can be se | Excel Discussion (Misc queries) | |||
Worksheet Protection | Excel Discussion (Misc queries) |