Results 1 to 2 of 2
2007-07-17, 15:57 #1
- Join Date
- Oct 2003
- Calgary, Alberta, Canada
- Thanked 0 Times in 0 Posts
Grouping in password protected document (Office 2007)
I have an XL spreadsheet that uses the outline feature to group certain categories and then allows me to select which level of the outline I want to view. So for instance I have a category called framing that has 4 subcategories. I may or may not want to see the subcategories. That feature works well until I lock down the document. I want the users to have access to specific cells only and yet still be able to group or ungroup the outline. How do I make it run in a protected document?
2007-07-17, 18:18 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Grouping in password protected document (Office 2007)
I don't have Excel 2007, but in earlier versions, you can only enable outlining in protected sheets using VBA code. So I assume you need to use either the old .xls format or the macro-enabled .xlsm format in Excel 2007, unless Microsoft added control over outlining in a protected sheet to the interface.
You need the following code to protect the first worksheet and enable outlining. The code should go into the ThisWorkbook module:
Private Sub Workbook_Open()
.EnableOutlining = True
The code will be executed each time the workbook is opened (provided that the user enables macros).