I'm struggling on the "ws.Protection.AllowEditRanges.Add Title:="Classified", Range:=Range("AA:AA, AI:AR")" area as its prompting me to debug. The end goal of this would be to allow users to edit a certain ranges while protecting the rest of the sheet and allowing outlining and column/ row formatting as well.
Sub Macro2()
'
' Macro2 Macro
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets(Array("VP Primary Care & Pop Health", "VP Integrated Hlth Prog Care 1", "VP Integrated Hlth Prog Care 2", "VP Integrated Hlth Community"))
ws.Protection.AllowEditRanges.Add Title:="Classified", Range:=Range("AA:AA,AI:AR")
ws.EnableOutlining = True
ws.Protect Password:="nshaforecast", UserInterfaceOnly:=True, AllowFormattingColumns:=True, AllowFormattingRows:=True
Next ws
End Sub
Bookmarks