Protected Sheet Permissions - Expanding grouped cells

Marian DiCicco

New Member
Joined
Oct 26, 2018
Messages
3
Hello Masters of Happiness, I have learned tons on this site without ever asking a question, but today I need help!!

I have a protected worksheet, and users are to access certain cells. Those columns that are most relevant are displayed, while less relevant columns are grouped and collapsed. I need the user to be able to expand and view the collapsed/hidden columns.

Can I enable such a permission in a protected worksheet/workbook? If so, how? I have experimented with the protect worksheet options, but no luck there. . . .
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I will try it - my first thought is that if I unlock the cells for expansion, then the content can be edited also - I wonder if I have to leave the cells 'unprotected' to enable the expansion of the grouped/collapsed columns?
 
Upvote 0
Thank you , Hellsteeth, but rats - this does not work(!) - don't know if it's version difference... I am in Excel 2016. Anyone?
 
Upvote 0
Hi,
Put this code into ThisWorkbook module
Rich (BB code):
Private Sub Workbook_Open()
  Const PWD = "123"  '<-- Put password here
  Dim Sh As Worksheet
  For Each Sh In Me.Worksheets
    Sh.Protect PWD, UserInterfaceOnly:=True
    Sh.EnableOutlining = True
  Next
End Sub
Replace "123" with real password for the sheets.
Then save workbook in macro enabled format (XLSM or XLSB), close and reopen workbook, allow macros.
Instead of workbook reloading you can run Workbook_Open manually as well.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top