Showing results for 
Search instead for 
Did you mean: 

Group/Ungroup not working in a protected sheet

Former Member
0 Kudos

Hi Experts,

I want to enable group/un group in a protected sheet, I tried below VBA code, however it won't work when i refresh the template.

Private Sub Workbook_Open()

    With Worksheets("Emp Summary")

        .EnableOutlining = True

        .Protect UserInterfaceOnly:=True

    End With

End Sub

Can anyone help me on this.

Thanks in advance.



Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos

You have to provide password in VBA code - the same as used for epm protection. Search google for code - it's very popular