Results 1 to 2 of 2
  1. #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?


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 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()
    With Worksheets(1)
    .Protect UserInterfaceOnly:=True
    .EnableOutlining = True
    End With
    End Sub

    The code will be executed each time the workbook is opened (provided that the user enables macros).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts