Expanding grouped rows when protected

cpfeffer

New Member
Joined
Aug 11, 2009
Messages
4
Is there any way to still allow users to expand rows when an Excel sheet is protected? There are options to allow user to format rows, sort, use autofilter, etc, but nothing for expanding rows.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I don't think so, that's one of the the differences between Hide and Group.

You need to write some code that undoes the protection, then groups the rows the use hss selected selection (you can specify EntireRow in the group property so they only need select cells) and redo the protection.
 
Upvote 0
Hey, I figured it out. Thanks.

Sub CollapseRows()
ActiveSheet.Unprotect "pwd"
ActiveSheet.Outline.ShowLevels RowLevels:=1
ActiveSheet.Protect "pwd"
End Sub


Sub ExpandRows()
ActiveSheet.Unprotect "pwd"
ActiveSheet.Outline.ShowLevels RowLevels:=2
ActiveSheet.Protect "pwd"
End Sub
 
Upvote 0

Forum statistics

Threads
1,226,730
Messages
6,192,703
Members
453,748
Latest member
akhtarf3

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