本示例判断当前工作表的内容处于保护状态,则显示一个消息框。

If Activesheets.ProtectContents Then
    MsgBox "保护中,不能修改内容!"
End If