Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
What code do I need in a macro to determine whether a sheet is protected or
not? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
John, here is one way,
Sub Check__Sheet_Protection() Dim wks As Worksheet Set wks = ActiveSheet With wks If .ProtectContents _ Or .ProtectDrawingObjects _ Or .ProtectScenarios Then MsgBox "Protected sheet" Exit Sub Else MsgBox "Unprotected Sheet" End If End With End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "John" wrote in message ... What code do I need in a macro to determine whether a sheet is protected or not? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protected Sheet Message | Excel Discussion (Misc queries) | |||
Applying autofilter to protected sheet | Excel Discussion (Misc queries) | |||
Protected sheet to unprotected sheet | Excel Worksheet Functions | |||
Copying multiple sheets from one book 2 another and undertake spec | Excel Discussion (Misc queries) | |||
Naming & renaming a sheet tab | Excel Worksheet Functions |