How to identify Editable ranges in a protected Excel sheet using VBA
My good friend Srikanth Srinivasan is a Project Manager whom Microsoft will definitely want to hire as evangelist. He uses the functionality of Excel to great extent and made it ubiquitous.
The following code was for him, which highlights the ranges that are not protected in Excel sheet
Sub HighLight_Editable_Ranges()
    Dim oWS As Worksheet
    Dim oRng As AllowEditRange
    
    Set oWS = ActiveSheet
    
    oWS.Unprotect
    
    For Each oRng In oWS.Protection.AllowEditRanges
        oRng.Range.Interior.ColorIndex = 35
    Next oRng
    
    oWS.Protect
End Sub
doesn't work with excel 2010?
ReplyDelete