Spread 8.0 Documentation
Protect Property
Support Options
ActiveX Reference > ActiveX Properties > Protect Property

Glossary Item Box

Protect Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns whether users can edit cells marked as locked with the Lock property.

Syntax

C++

BOOL CSpreadSheet::GetProtect( );
void CSpreadSheet::SetProtect(BOOL value);

Visual Basic

[form.]fpSpread.Protect[ = boolean%]

Remarks

The default value for the Protect property is True.

This setting is applied to the entire workbook, including all sheets in the control.

You can specify that certain cells are locked; that is, the user cannot edit them. In addition, locked cells can display different background and text colors. You mark cells as locked using the Lock property. Cells are not locked until the Protect property is set to True. Because the Protect property's default value is True, unless you have changed the value of the Protect property, when you mark cells as locked, they are immediately locked.

Note that when the Protect property is set to False, the user can still interact with cells marked as locked.

Spread Designer

Choose the Book menu, then the Environment menu, select the Environment tab, and then choose the Protect Locked Cells check box in the Book Settings dialog box.

In the Spread Designer the Protect property is temporarily reset to False when in design mode, to assist you in the design process. When you switch to run-time mode, the sheet behaves according to the setting you have chosen for this property.

Data Type

Integer (Boolean)

See Also

Locking the Sheet
Unlocking the Sheet

BlockMode, Col, Col2, Lock, Row, Row2 properties

EditError event

DLL Correspondence

SSGetBool (SSB_PROTECT), SSSetBool (SSB_PROTECT) functions

Copyright © GrapeCity, inc. All rights reserved.