Print? Excel. Worksheet. Protect (
[OptionalAttribute] Object Password,
[OptionalAttribute] Object DrawingObjects,
[OptionalAttribute] Object Contents,
[OptionalAttribute] Object Scenarios,
[OptionalAttribute] Object UserInterfaceOnly,
[OptionalAttribute] Object AllowFormattingCells,
[OptionalAttribute] Object AllowFormattingColumns,
[OptionalAttribute] Object AllowFormattingRows,
[OptionalAttribute] Object AllowInsertingColumns,
[OptionalAttribute] Object AllowInsertingRows,
[OptionalAttribute] Object AllowInsertingHyperlinks,
[OptionalAttribute] Object AllowDeletingColumns,
[OptionalAttribute] Object AllowDeletingRows,
[OptionalAttribute] Object AllowSorting,
[OptionalAttribute] Object AllowFiltering,
[OptionalAttribute] Object allowusingtransferttables
)
Excel. Worksheet. Protect (
[OptionalAttribute] Object Password,
[OptionalAttribute] Object DrawingObjects,
[OptionalAttribute] Object Contents,
[OptionalAttribute] Object Scenarios,
[OptionalAttribute] Object UserInterfaceOnly,
[OptionalAttribute] Object AllowFormattingCells,
[OptionalAttribute] Object AllowFormattingColumns,
[OptionalAttribute] Object AllowFormattingRows,
[OptionalAttribute] Object AllowInsertingColumns,
[OptionalAttribute] Object AllowInsertingRows,
[OptionalAttribute] Object AllowInsertingHyperlinks,
[OptionalAttribute] Object AllowDeletingColumns,
[OptionalAttribute] Object AllowDeletingRows,
[OptionalAttribute] Object AllowSorting,
[OptionalAttribute] Object AllowFiltering,
[OptionalAttribute] Object allowusingtransferttables
) Password, the Password of the worksheet, case sensitive. If this parameter is omitted, you do not need to use a password to disable worksheet protection. Otherwise, you must specify a password to disable worksheet protection. If you forget the password, you cannot disable worksheet protection. It is best to save the list of passwords and their corresponding document names in a safe location.
DrawingObjects. If it is set to true, the shape is protected. The default value is false.
Contents, which is true to protect the content in the locked cell. The default value is true.
Scenarios. If it is true, the protection scheme is used. The default value is true.
UserInterfaceOnly, which is true to protect the user interface, but not macros. If this parameter is omitted, both macro and user interface applications are protected.
If AllowFormattingCells is set to true, You Can format any cells in the protected worksheet. The default value is false.
If AllowFormattingColumns is set to true, You Can format any columns in a protected worksheet. The default value is false.
If AllowFormattingRows is set to true, You Can format any row in the protected worksheet. The default value is false.
If AllowInsertingColumns is set to true, columns can be inserted to a protected worksheet. The default value is false.
If AllowInsertingRows is set to true, you can insert rows to a protected worksheet. The default value is false.
If AllowInsertingHyperlinks is set to true, you can insert a hyperlink to the worksheet. The default value is false.
If AllowDeletingColumns is set to true, you are allowed to delete columns in a protected worksheet. Each cell in the column to be deleted is unlocked. The default value is false.
If the value of AllowDeletingRows is true, you are allowed to delete rows in a protected worksheet. Each cell in the row to be deleted is unlocked. The default value is false.
If AllowSorting is set to true, the user is allowed to sort the protected worksheet. Each cell in the sorting range must be unlocked or unprotected. The default value is false.
If AllowFiltering is set to true, you can set a filter on the protected worksheet. You can change filtering conditions, but cannot enable or disable automatic filtering. You can set a filter on an existing automatic filter. The default value is false.
If the value of allowusingtransferttables is true, you can use a PivotTable on a protected worksheet. The default value is false.