Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Ken Johnson wrote: Hi Wally, The following macros worked for me... To protect some sheets first use Shift-Click Tab to group those sheets then run the following macro... Public Sub ProtectSelectedSheets() Dim Sht As Worksheet Dim ncProtect As New Collection For Each Sht In ActiveWindow.SelectedSheets ncProtect.Add Item:=Sht Next Sht Worksheets(1).Select For Each Sht In ncProtect Sht.Protect Next Sht End Sub To Unprotect some protected sheets first use Shift-Click Tab to group those sheets then run the following macro... Public Sub UnprotectSelectedSheets() Dim Sht As Worksheet Dim ncUnprotect As New Collection For Each Sht In ActiveWindow.SelectedSheets ncUnprotect.Add Item:=Sht Next Sht Worksheets(1).Select For Each Sht In ncUnprotect Sht.Unprotect Next Sht End Sub I have assumed that you have NOT used passwords to protect your sheets. Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lookup function and compare | Excel Discussion (Misc queries) | |||
Cell but not sheet protection | Excel Discussion (Misc queries) | |||
Copying multiple sheets from one book 2 another and undertake spec | Excel Discussion (Misc queries) | |||
Filter Switches vs Sheet Protection? | Excel Discussion (Misc queries) | |||
Naming & renaming a sheet tab | Excel Worksheet Functions |