Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

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