如果允许用户在受保护的工作表上插入行,则返回 True。Boolean 类型,只读。
expression.AllowInsertingRows
expression 必需。该表达式返回一个 Protection 对象。
可用 Protect 方法的参数设置 AllowInsertingRows 属性。
本示例允许用户在受保护的工作表上插入行,并通知用户。
Sub ProtectionOptions()
ActiveSheet.Unprotect
' Allow rows to be inserted on a protected worksheet.
If ActiveSheet.Protection.AllowInsertingRows = False Then
ActiveSheet.Protect AllowInsertingRows:=True
End If
MsgBox "Rows can be inserted on this protected worksheet."
End Sub