Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am trying to use the code below to protect all the tabs in an excel file if the tab color has not been changed or appears grey. The code does not seem to be checking every tab, it only works for the tab that is active and does not continue to the next tabs. Can you please help me determine why it is not working? Thank you, Dim wks As Worksheet For Each wks In ActiveWorkbook.Worksheets If wks.Tab.ColorIndex = xlColorIndexNone Then ActiveSheet.Protect Password:=" ", DrawingObjects:=True, Contents:=True, Scenarios:=True Else End If Next wks MsgBox "The Workbook is Protected" |
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 | |||
WS Protection: Different Levels of Protection on Different Ranges | 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) |