Re: Problems using outlines on a protected ***

From: Dave Peterson (ec35720_at_msn.com)
Date: 06/10/04


Date: Wed, 09 Jun 2004 19:09:48 -0500

If you already have the outline applied, you can protect the work*** in code
(auto_open/workbook_open??).

Option Explicit
Sub auto_open()
    With Worksheets("sheet1")
        .Protect Password:="hi", userinterfaceonly:=True
        .EnableOutlining = 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.)

(you could use the workbook_open even under ThisWorkbook, too.)

Don't forget to lock the VBA Project, too. Else you'll have inquisitive types
looking at your code and seeing the password.

Inside the VBE, you can lock the project.
Tools|VBAProject Properties|Protection tab.
Give it a memorable password and lock the project for viewing.

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

"corrie <" wrote:
>
> The spread*** that I am building is for giving price quotes for server
> builds. I need to use grouping and outline to be able to shrink each
> section down to just subtotals (subtotal of server components,
> back-ups, and software). This is no problem, the problem is however
> that the functions that are used to calculate everything need to be in
> locked cells. As soon as I lock the formula cells, and protect the
> ***, I can't use the outline buttons on the side to shrink or expand.
> I tried changing the protecting to include formatting,inserting and
> deleting columns and rows, but it still won't let me use them.
>
> I would appreciate any suggestions... thanks!
>
> ---
> Message posted from http://www.ExcelForum.com/

-- 
Dave Peterson
ec35720@msn.com