How do I know from C# code if sheet is protected ?

T

Tom Ogilvy

from help on ProtectionMode:
True if user-interface-only protection is turned on. To turn on user
interface protection, use the Protect method with the UserInterfaceOnly
argument set to True. Read-only Boolean.

--------

this is the least likely Protection Related attribute to return True since
this form of protection can only be set in code.

You need to check all 4 attribues

ProtectContents
ProtectDrawingObjects
ProtectScenarios
ProtectMod

all worksheet attributes.
 
Top