close

Can anyone help with this

I have created a file and grouped the data at 5 different levels for
viewing/reporting. Most of the cells in the worksheet contain formulas
so I would like to project the cells but when I protect the worksheet I
lose the ability to group and ungroup the data. Is there anyway I can
protect the cells/worksheet and still have the option of group/outline?

Many thanks--
mkf
------------------------------------------------------------------------
mkf's Profile: www.excelforum.com/member.php...nfoamp;userid=601
View this thread: www.excelforum.com/showthread...hreadid=541921If 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(quot;sheet1quot;)
.Protect Password:=quot;hiquot;, userinterfaceonly:=True
.EnableOutlining = True
'.EnableAutoFilter = True
End With
End Sub

It needs to be reset each time you open the workbook. (excel doesn't remember
it after closing the workbook.)

If you're new to macros, you may want to read David McRitchie's intro at:
www.mvps.org/dmcritchie/excel/getstarted.htm

mkf wrote:
gt;
gt; Can anyone help with this
gt;
gt; I have created a file and grouped the data at 5 different levels for
gt; viewing/reporting. Most of the cells in the worksheet contain formulas
gt; so I would like to project the cells but when I protect the worksheet I
gt; lose the ability to group and ungroup the data. Is there anyway I can
gt; protect the cells/worksheet and still have the option of group/outline?
gt;
gt; Many thanks
gt;
gt; --
gt; mkf
gt; ------------------------------------------------------------------------
gt; mkf's Profile: www.excelforum.com/member.php...nfoamp;userid=601
gt; View this thread: www.excelforum.com/showthread...hreadid=541921

--

Dave Peterson

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()