ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I know from C# code if sheet is protected ? (https://www.excelbanter.com/excel-programming/302943-how-do-i-know-c-code-if-sheet-protected.html)

tusya[_2_]

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

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

How do I know from C# code if sheet is protected ?
 
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.

--
Regards,
Tom Ogilvy

"Inbar" wrote in message
...
Check the boolean Worksheet.ProtectionMode to find out...

"tusya " wrote:

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


---
Message posted from http://www.ExcelForum.com/






All times are GMT +1. The time now is 10:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com