+ Reply to Thread
Results 1 to 4 of 4

Sheet Protection - Grouping

  1. #1
    Registered User
    Join Date
    04-20-2005
    Posts
    48

    Sheet Protection - Grouping

    I want to protect a worksheet; however, I don't want to lose the ability to collapse/uncollapse rows that I have grouped together.

    What option needs to be checked when locking the sheet to allow this? Or, is it not possible?

    Thanks,
    JC

  2. #2
    Dave Peterson
    Guest

    Re: Sheet Protection - Grouping

    If you already have the outline 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
    End With
    End Sub

    (I wasn't sure what caused your outlining--data|Group or Data|subtotals).)

    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:
    http://www.mvps.org/dmcritchie/excel/getstarted.htm

    carlyman wrote:
    >
    > I want to protect a worksheet; however, I don't want to lose the ability
    > to collapse/uncollapse rows that I have grouped together.
    >
    > What option needs to be checked when locking the sheet to allow this?
    > Or, is it not possible?
    >
    > Thanks,
    > JC
    >
    > --
    > carlyman
    > ------------------------------------------------------------------------
    > carlyman's Profile: http://www.excelforum.com/member.php...o&userid=22440
    > View this thread: http://www.excelforum.com/showthread...hreadid=469911


    --

    Dave Peterson

  3. #3
    Registered User
    Join Date
    04-20-2005
    Posts
    48
    Thanks Dave, but is it possible to do without using Macros? I try to avoid them as much as possible unless absolutely necessary.

    I grouped the rows by going to "Data -> Group and Outline -> Group"

    Again, thanks for your help.
    JC

  4. #4
    Dave Peterson
    Guest

    Re: Sheet Protection - Grouping

    You can do it manually, but you'd still have to do it each time you open the
    workbook.

    Open the workbook.
    hit alt-f8 (to get to the VBE -- where those macros live!)
    hit ctrl-r (to see the project explorer -- like windows explorer)
    find your workbook/project and click on it
    hit the asterisk on the number keypad, not shift-8
    this will expand all the levels of the project.

    Look for your worksheet name and click on it
    hit F4 to see its properties.

    Look for the Enableoutlining property and change that to True.

    ======
    The macro doesn't look too bad, huh?


    carlyman wrote:
    >
    > Thanks Dave, but is it possible to do without using Macros? I try to
    > avoid them as much as possible unless absolutely necessary.
    >
    > I grouped the rows by going to "Data -> Group and Outline -> Group"
    >
    > Again, thanks for your help.
    > JC
    >
    > --
    > carlyman
    > ------------------------------------------------------------------------
    > carlyman's Profile: http://www.excelforum.com/member.php...o&userid=22440
    > View this thread: http://www.excelforum.com/showthread...hreadid=469911


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1