Protected Sheet and grouping

A

Ahmad Priyanto

Dear all,

I have a case with excel. in this case, i wanna make a report for everyone,but i want, nobody can change the format, the insert column, delete column, etc. and i have made a grouping in my sheet. and the problem is " when I protected my sheet, i cannot collapse and expand the grouping ". anybody help me please to solve this problem.


Thanks

Toto
 
G

GS

Dear all,
I have a case with excel. in this case, i wanna make a report for
everyone, but i want, nobody can change the format, the insert
column, delete column, etc. and i have made a grouping in my sheet.
and the problem is " when I protected my sheet, i cannot collapse and
expand the grouping ". anybody help me please to solve this problem.


Thanks

Toto

This is a non-persistent setting. You must reset this each time the
file opens, OR when the sheet is activated...

In the code module behind the sheet:

Option Explicit

Private Sub Worksheet_Activate()
ActiveSheet.EnableOutlining = True
End Sub


...or when the file opens, loop through each sheet that needs this set:

Option Explicit

Private Sub Workbook_Open()
Call ResetOutlining
End Sub

...where the following is stored in a standard module:

Option Explicit

Sub ResetOutlining()
Const sWksToReset$ = "Sheet1,Sheet2" '//edit to suit
Dim vTmp, n&
vTmp = Split(sWksToReset, ",")
For n = LBound(vTmp) To UBound(vTmp)
ThisWorkbook.Sheets(vTmp(n)).EnableOutlining = True
Next 'n
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 

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