Remove user edit range : Worksheet Protection « Excel « VBA / Excel / Access / Word






Remove user edit range

 

Sub RemoveUserEditRange()
    Dim ws As Worksheet, rng As Range, aer As AllowEditRange
    Set ws = ThisWorkbook.Sheets("Protection")
    ws.Unprotect
    For Each aer In ws.Protection.AllowEditRanges
        aer.Delete
    Next
End Sub

 








Related examples in the same category

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