Show Protection Properties : Worksheet Protection « Excel « VBA / Excel / Access / Word






Show Protection Properties

 
Sub ShowProtectionProperties()
    Dim ws As Worksheet, prot As Protection
    Set ws = ThisWorkbook.Sheets("Protection")
    Set prot = ws.Protection
    Debug.Print prot.AllowDeletingColumns
    Debug.Print prot.AllowDeletingRows
    Debug.Print prot.AllowFiltering
    Debug.Print prot.AllowSorting
    Debug.Print prot.AllowUsingPivotTables
    Debug.Print prot.AllowFormattingCells
    Debug.Print prot.AllowFormattingColumns
    Debug.Print prot.AllowFormattingRows
    Debug.Print prot.AllowInsertingColumns
    Debug.Print prot.AllowInsertingRows
    Debug.Print prot.AllowInsertingHyperlinks
End Sub

 








Related examples in the same category

1.Add protection to Worksheet
2.Protect Sheet
3.Unprotect worksheet
4.remove user
5.Remove user edit range
6.Add user edit range
7.Formulas Protection
8.Protecting Worksheet Assets with the Protect Method