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

  • Thread starter Thread starter tusya
  • Start date Start date
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top