ProtectedRange Class
Represents a range of cells to be protected.
- Inheritance:
- System.ObjectProtectedRange
Remarks
Ranges listed here are protected only when the sheet protection is ON and the cell is flagged as being locked.If no password is specified here, then read/write permissions are automatically given to all users, regardless of additional security descriptor information. In other words, the security descriptor information (specific types of access) at the user level is only applied if a password for this range is specified.
When a password is specified, then users not listed specifically as having access should be prompted with a password.If that user supplies the correct password, then they can edit the range or cell in question.This protection is optional and can be ignored by applications that choose not to support this functionality.
Properties
RefersToCells
Gets or sets the range to be protected.
Property Value
- System.String
The range to be protected.
Title
Gets or sets the ProtectedRange title.
Property Value
- System.String
The ProtectedRange title.
Methods
SetPassword(String)
Sets the ProtectedRange password.
Parameters
password
- System.String
The ProtectedRange password.
ToString()
Returns a System.String that represents this ProtectedRange instance.
Returns
- System.String
A System.String that represents this ProtectedRange instance.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).