Expanding groups in a protected sheet

D

DanSpenc

I'm trying to find a way to allow a user to expand grouped cells on
protected sheet without first having to unprotected it
 
D

Dave Peterson

Are grouped cells created via Data|group or Data|Subtotal?

If yes, you can protect the worksheet in code...

But this setting isn't remembered between closing/reopening the workbook. (So
Auto_open is a nice spot for it.)

Option Explicit
Sub auto_open()

Dim wks As Worksheet
Set wks = Worksheets("sheet1")

With wks
.Protect Password:="hi", userinterfaceonly:=True
.EnableAutoFilter = True
'or
.EnableOutlining = True
End With

End Sub

EnableAutofilter/enableoutlining--depending on what you mean by grouped.

And autofilter or the outlining has to be applied beforehand.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top