Hi Excel Masters 
I have done some research on line and it seems that there is a bug in excel as there is no simple way to use the group function by default when the sheet is protected (even if you tick the option outline in the pop up window).
My question is : What is the workaround?
I have found the below macro but can not make it work.. How can I change the below code to make it work automaticaly if I can... Do I need to link the macro to a button? Also, let say I want to use a password?
As usual, thanks in advance
<code>Option Explicit Sub group() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets With ws .EnableOutlining = True ' .Protect Contents:=True, UserInterfaceOnly:=True End With End Sub</code></pre>

I have done some research on line and it seems that there is a bug in excel as there is no simple way to use the group function by default when the sheet is protected (even if you tick the option outline in the pop up window).
My question is : What is the workaround?
I have found the below macro but can not make it work.. How can I change the below code to make it work automaticaly if I can... Do I need to link the macro to a button? Also, let say I want to use a password?
As usual, thanks in advance
<code>Option Explicit Sub group() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets With ws .EnableOutlining = True ' .Protect Contents:=True, UserInterfaceOnly:=True End With End Sub</code></pre>