Name
worksheet.Protect([Password], [DrawingObjects], [Contents], [Scenarios], [UserInterfaceOnly], [AllowFormattingCells], [AllowFormattingColumns], [AllowFormattingRows], [AllowInsertingColumns], [AllowInsertingRows], [AllowInsertingHyperlinks], [AllowDeletingColumns], [AllowDeletingRows], [AllowSorting], [AllowFiltering], [AllowUsingPivotTables])
Synopsis
Protects a worksheet and sets options determining which items on the worksheet are protected. The arguments to this method correspond to the settings on the Protect Sheet dialog box shown in Figure 26-7.
|
Argument |
Settings |
|---|---|
|
|
The password required to unprotect the worksheet. |
|
|
True protects graphic objects such as command buttons and shapes on the worksheets; False does not protect. Default is True. |
|
|
True protects the locked cells on the worksheet; False does not protect. Default is True. |
|
|
True protects scenarios on the worksheets; False does not protect. Default is True. |
|
|
True protects the worksheet from changes made through the Excel interface, but allows macros to make changes to protected items; False applies the protection to both types of changes. Default is False. |
|
|
If the contents are protected, then setting any of these ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access