Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically determining if worksheet is protected
How would I check to see if the activesheet is protected? I know how to
protect and unprotect programmatically, but only want to unprotect it if it's already protected. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically determining if worksheet is protected
If Worksheets("Sheet1").ProtectContents = True Then
MsgBox "The contents of Sheet1 are protected." End If -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Barb Reinhardt" wrote in message ... How would I check to see if the activesheet is protected? I know how to protect and unprotect programmatically, but only want to unprotect it if it's already protected. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically determining if worksheet is protected
It is not really worth checking. Just run the unprotect. You can however
check to see if it is protected something like this... dim wks as worksheet for each wks in worksheets if wks.protectcontents = true then wks.unprotect next wks -- HTH... Jim Thomlinson "Barb Reinhardt" wrote: How would I check to see if the activesheet is protected? I know how to protect and unprotect programmatically, but only want to unprotect it if it's already protected. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Programmatically determining corrupt excel files | Excel Discussion (Misc queries) | |||
Programmatically determining CODE NAME for sheet based upon Sheet | Excel Programming | |||
Determining last active cell in a protected worksheet | Excel Programming | |||
Programmatically delete macro using a protected project | Excel Programming | |||
How to programmatically check if a workbook is protected t? | Excel Programming |