返回一个
Protection 对象,该对象表示工作表的保护选项。
语法
表达式.Protection
表达式 一个代表 Worksheet 对象的变量。
示例
本示例对活动工作表进行保护,并判断是否能在受保护的工作表中插入列,然后将此状态通知用户。
示例代码 |
function CheckProtection(){
ActiveSheet.Protect()
// Check the ability to insert columns on a protected sheet.
// Notify the user of this status.
if( ActiveSheet.Protection.AllowInsertingColumns == true){
MsgBox("The insertion of columns is allowed on this protected worksheet.")
}
else{
MsgBox("The insertion of columns is not allowed on this protected worksheet.")
}
}
|