Disable grouping and ungrouping on a protected sheet/tab

drom

Well-known Member
Joined
Mar 20, 2005
Messages
566
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and thanks in advance!

Is it possible to disable outlining, I mean (grouping and ungrouping) in a protected sheet/tab in excel

In one of my Excel sheets/tabs I have freeze panes on cell D7
  • Rows 1:7 are grouped
  • I have many headings and formulas inRows1:5 because this tab contains many tables
    • And I am using sumproduct formulas to check in the table's data is OK
    • eg =SUMPRODUCT(--(Tabla1[A]="OK")) (Non sense formula just for this question)

From Column C:Z I have columns grouped

When someone activates this sheet I have a
VBA Code:
Private Sub Worksheet_Activate()
  ActiveSheet.Outline.ShowLevels RowLevels:=1, columnlevels:=1
  ActiveWindow.ScrollRow = 1
End Sub

I would like to protect the tab and disable the possibility to ungroups the rows and columns using:
  • The 1,2,3 numbers on the top left of the sheet
  • The + symbol on the top of AA
  • The + symbol on the left of rows 7



So i would like to disable ungrouping and grouping in my protected tab


I know I can lock rows 1:6 and Column C:Z and avoid selecting the locked cells but is there any way to disable grouping and ungrouping on a protected sheet/tab

Thanks again
 
Hmm, so many Messages (564)... Like example.
VBA Code:
Option Explicit

Sub Macro1()
   
    With ActiveSheet
        .Unprotect
        .EnableOutlining = False
        .Protect , UserInterfaceonly:=True
    End With

End Sub
 
Upvote 0

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