如果工作簿窗口受保护,则该值为 True。Boolean 类型,只读。
本示例检查活动工作簿窗口是否受保护,如果是则显示一条信息。
If ActiveWorkbook.ProtectWindows = True Then MsgBox "Remember, you cannot rearrange any" & _ " window in this workbook." End If