SpreadsheetGear 2010
Protect Method
See Also  Send Feedback
SpreadsheetGear Namespace > IWorkbook Interface : Protect Method

password
The password which will be required to open and / or unprotect the workbook.
protectStructure
Specifies whether the structure (number and order of worksheets) of this workbook may be changed.
protectWindows
Specifies whether the windows of this workbook are protected from changes.
Enables protection for this workbook with the specified password and protection options.

Syntax

Visual Basic (Declaration) 
Sub Protect( _
   ByVal password As String, _
   ByVal protectStructure As Boolean, _
   ByVal protectWindows As Boolean _
) 
C# 
void Protect( 
   string password,
   bool protectStructure,
   bool protectWindows
)

Parameters

password
The password which will be required to open and / or unprotect the workbook.
protectStructure
Specifies whether the structure (number and order of worksheets) of this workbook may be changed.
protectWindows
Specifies whether the windows of this workbook are protected from changes.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Copyright © 2003-2010 SpreadsheetGear LLC. All Rights Reserved.Help Powered by Innovasys   
SpreadsheetGear is a registered trademark of SpreadsheetGear LLC.
Microsoft, Microsoft Excel and Visual Studio are trademarks or registered trademarks of Microsoft Corporation.