Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to protect all the sheets in a workbook without specifying
each sheet separately. Currently, I select each sheet and then do ActiveSheet.Unprotect. Thanks, Mike. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I found an answer:
For Each sht In ActiveWorkbook.Sheets ActiveSheet.Protect Password:="password", DrawingObjects:=True, Contents:=True, Scenarios:=True Next The same goes for unprotect. Thanks, Mike. "Mike D." wrote: Is there a way to protect all the sheets in a workbook without specifying each sheet separately. Currently, I select each sheet and then do ActiveSheet.Unprotect. Thanks, Mike. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Since you're working with the active sheet:
For Each sht In ActiveWorkbook.Sheets sht.select ActiveSheet.Protect Password:="password", DrawingObjects:=True, _ Contents:=True, Scenarios:=True Next sht or without activating For Each sht In ActiveWorkbook.Sheets sht.Protect Password:="password", DrawingObjects:=True, _ Contents:=True, Scenarios:=True Next sht Mike D. wrote: I found an answer: For Each sht In ActiveWorkbook.Sheets ActiveSheet.Protect Password:="password", DrawingObjects:=True, Contents:=True, Scenarios:=True Next The same goes for unprotect. Thanks, Mike. "Mike D." wrote: Is there a way to protect all the sheets in a workbook without specifying each sheet separately. Currently, I select each sheet and then do ActiveSheet.Unprotect. Thanks, Mike. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Data Protection Best Practice: AKA: Real Sheet Protection | Excel Discussion (Misc queries) | |||
Excel Data Protection- AKA: Sheet/Macro Password Protection | Setting up and Configuration of Excel | |||
Unprotection of outlined data in protected worksheet | Excel Discussion (Misc queries) | |||
Unprotection once performed... | Excel Discussion (Misc queries) | |||
Sheet protection error msg - Unrequested sheet activation | Excel Programming |