Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Mike, That's brilliant! And much quicker putting the below before
each and every code, thank-you. Sheets("Drainage Accessories Input").Select ActiveSheet.Unprotect Sheets("Drainage Input").Select ActiveSheet.Unprotect Sheets("Accessories").Select ActiveSheet.Unprotect Sheets("Summary Tables").Select ActiveSheet.Unprotect Sheets("Drainage Accessories Input").Select ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True Sheets("Drainage Input").Select ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True Sheets("Accessories").Select ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True Sheets("Summary Tables").Select ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True "Mike H" wrote: You would have to write one. This protects all sheets if they are unprotected and vice versa. Simply call it from your sub Sub sistence() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets If ws.ProtectContents Then ws.Unprotect Password:="MyPass" Else ws.Protect Password:="MyPass" End If Next End Sub Mike "Neil Pearce" wrote: Is there a macro that will automatically unprotect all worksheets when any other marco is run? More porblematic one would assume is a macro that automatically protects all worksheets when another macro ends? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
password protection macro - HELP???? | Excel Discussion (Misc queries) | |||
Macro and row protection | Excel Discussion (Misc queries) | |||
Protection Macro | Excel Discussion (Misc queries) | |||
Macro Protection | New Users to Excel | |||
macro for protection | Excel Discussion (Misc queries) |