Uncollapse Grouped Rows on a Proctected worksheet

T

Tanya

I have grouped rows on a worksheet then protected the
worksheet to prevent users from inserting rows.

I would like to collapse the rows so the user only sees
the group descriptions. I would then like them to
uncollapse the group they wish to enter in.

Any suggestions?

Thanks.
 
D

Dave Peterson

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 already be applied.
 

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