AllowFormattingRows 属性

       

如果允许对受保护的工作表上的行进行格式设置,则返回 TrueBoolean 类型,只读。

expression.AllowFormattingRows

expression   必需。该表达式返回一个 Protection 对象。

说明

可用 Protect 方法的参数设置 AllowFormattingRows 属性。

示例

本示例允许用户对受保护的工作表上的行进行格式设置,并通知用户。

Sub ProtectionOptions()

    ActiveSheet.Unprotect

    ' Allow rows to be formatted on a protected worksheet.
    If ActiveSheet.Protection.AllowFormattingRows = False Then
        ActiveSheet.Protect AllowFormattingRows:=True
    End If

    MsgBox "Rows can be formatted on this protected worksheet."

End Sub