Remove Edit Ranges : Range Permission « Excel « VBA / Excel / Access / Word






Remove Edit Ranges

 
Sub RemoveEditRanges()
    Dim ws As Worksheet, ual As UserAccessList, aer As AllowEditRange
    Set ws = ThisWorkbook.Sheets("Protection")
    ws.Unprotect "Excel2003"
    For Each aer In ws.Protection.AllowEditRanges
        aer.Delete
    Next
    ws.Protect "Excel2003"
End Sub

 








Related examples in the same category

1.Add Edit Range
2.remove user