Show the workbook protection : Workbook Protect « Excel « VBA / Excel / Access / Word






Show the workbook protection

 
Sub ShowWbProtection()
    Dim wb As Workbook
    Set wb = ThisWorkbook
    Debug.Print "Structure protected? " & wb.ProtectStructure, _
      "Windows protected? " & wb.ProtectWindows
End Sub

 








Related examples in the same category

1.Protect workbook
2.Unprotect Workbook
3.checks the UserName; if it is not Admin, this code protects each sheet from user changes