Using "Group and Outline" in a protected sheet with some cells locked. I want all users to be able to expand and collapse grouped rows and columns

I am sing "Group and Outline" in a protected sheet with some cells locked. I want all users to be able to expand and collapse grouped rows and columns.
The normal user doesnot have the password, so he is able to edit only the Unlocked cells. However, I want the normal user to be able to expand and collapse grouped rows and columns.
How do I do this? For my Excel file, the normal user is unable to Expand and Collapse grouped rows and cloumns.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hello psms,

you could try something like
add this little macro to the workbook, it will protect your sheet wll giving the users the ability to use outlining

Option Explicit
Sub auto_open()
    With Worksheets("sheet1")
        .Protect Password:="hi", userinterfaceonly:=True
        .EnableOutlining = True
    End With
End Sub

hope this helps a bit

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
[ fanpages ]IT Services ConsultantCommented:

If your version of MS-Excel does not offer the option of selectively enabling the Outlining option when protecting worksheets, you could draw a single ("toggle") command button on your sheet, or maybe two buttons ("Expand", and "Compress", or "UnGroup", and "Group", for example), that can be used to unprotect the worksheet perform the required outlining grouping task, then re-protect.

For example,

In the appropriate Worksheet code module:

' Start of Code...

Option Explicit
Sub CommandButton_Group()

  ActiveSheet.Unprotect Password:="password"
  ActiveSheet.Outline.ShowLevels RowLevels:=1
  ActiveSheet.Outline.ShowLevels ColumnLevels:=1
  ActiveSheet.Protect Password:="password"

End Sub
Sub CommandButton_UnGroup()

  ActiveSheet.Unprotect Password:="password"
  ActiveSheet.Outline.ShowLevels RowLevels:=2
  ActiveSheet.Outline.ShowLevels ColumnLevels:=2
  ActiveSheet.Protect Password:="password"

End Sub

' ...End of Code


[ fanpages ]IT Services ConsultantCommented:
(The button(s) provided could either be on-sheet command buttons, or perhaps a dedicated Toolbar could be created to make the button(s) available).
[ fanpages ]IT Services ConsultantCommented:
Thanks Jeroen.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.