expanding or collapsing groupings in protected worksheets
Dave, can you give me line by line instructions on how and where to apply
your solution? Also, do I need to re-establish your solution every time the
worksheet is used in excel 2003?
Thanks
--
vince m
"Dave Peterson" wrote:
If you already have the outline/subtotals/autofilter applied, you can protect
the worksheet in code (auto_open/workbook_open??).
Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
.EnableOutlining = True
.EnableAutoFilter = True
'If .FilterMode Then
' .ShowAllData
'End If
End With
End Sub
It needs to be reset each time you open the workbook. (Earlier versions of
excel don't remember it after closing the workbook. IIRC, xl2002+ will remember
the allow autofilter setting under tools|Protection|protect sheet, but that
won't help when you're filtering via code.)
======
I wasn't sure how you created the groupings--data|group or
data|filter|autofilter. You probably won't need both the .enableoutlining and
..enableautofilter. Delete/comment the one you don't want.
If you used data|filter|autofilter and want to make sure that all the data is
visible, you may want to uncomment those if/then/end if lines.
vince @ west electric group wrote:
Help!!! I have a protected worksheet which I share with managers. I've
included groupings which I want the managers to expand or collapse, but they
can't because the worksheet is protected. What can I do to allow collapsing
and expanding groups on a protected worksheet. thanks
--
vince m
--
Dave Peterson
|