Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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/




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code and protected cells manni Excel Discussion (Misc queries) 9 March 30th 10 04:30 PM
Code fails when sheet is protected Tail Wind Excel Discussion (Misc queries) 3 September 4th 07 03:23 PM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM
Checking with code to see if a Workbook is Protected? debartsa Excel Programming 1 January 21st 04 03:40 PM
Unwanted Protected Code Tom Ogilvy Excel Programming 0 July 19th 03 10:48 PM


All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"