Sheet Protection and Column Grouping

XL Pro

Board Regular
Joined
Apr 17, 2002
Messages
249
Office Version
  1. 365
Platform
  1. Windows
I have several columns grouped for hiding/showing of information.
However, with sheet protection turned on, the +/- for showing the columns is not available. Is there a way to trap the events of the group option buttons so that I can turn off protection as needed?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You can use the same "trick" to enable AutoFilter, but enabling Outlining:

<font face=Courier New>
<SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Worksheet_Activate()
    <SPAN style="color:#00007F">With</SPAN> Me
        .EnableOutlining = <SPAN style="color:#00007F">True</SPAN>
        .Protect "password", UserInterfaceOnly:=<SPAN style="color:#00007F">True</SPAN>
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>

The groups were already created in my example...
 
Upvote 0
Yes! I think this was the last hurdle.

I think I've finally got a very good interactive worksheet while still maintaining worksheet protection.

Thanks!
 
Upvote 0
I tried the code above without sucess.

Our issue is NOT that the +/- is not available when protection is turned on.
It is that we receive the error above when clicking on the +/- when protection is turned on.
 
Upvote 0
I used the search and found that the code provide in this thread is exactly what I needed for my problem. However after sharing my file (excel 2000) with some coworkers, I have found that it doesn't seem to work for those who are running XP with excel 2002. Is there any work-around for this? :banghead:
 
Upvote 0

Forum statistics

Threads
1,223,941
Messages
6,175,541
Members
452,652
Latest member
eduedu

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