+ Reply to Thread
Results 1 to 5 of 5

Protected worksheet, showing and hiding Grouped detail

  1. #1
    Colin_Bizfine
    Guest

    Protected worksheet, showing and hiding Grouped detail

    I have column data that is grouped. When I apply protection to the worksheet
    it is not possible to show hidden columns or hide displayed columns.
    I want users to be able to do this so that they can adjust the detail that
    is printed for their own purposes but I want the content of the sheet
    protected.
    Is there any way to do this?

  2. #2
    Dave Peterson
    Guest

    Re: Protected worksheet, showing and hiding Grouped detail

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

    Colin_Bizfine wrote:
    >
    > I have column data that is grouped. When I apply protection to the worksheet
    > it is not possible to show hidden columns or hide displayed columns.
    > I want users to be able to do this so that they can adjust the detail that
    > is printed for their own purposes but I want the content of the sheet
    > protected.
    > Is there any way to do this?


    --

    Dave Peterson

  3. #3
    Colin_Bizfine
    Guest

    Re: Protected worksheet, showing and hiding Grouped detail

    Thanks Dave, I will give that a try

    "Dave Peterson" wrote:

    > 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
    > 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:
    > http://www.mvps.org/dmcritchie/excel/getstarted.htm
    >
    > Colin_Bizfine wrote:
    > >
    > > I have column data that is grouped. When I apply protection to the worksheet
    > > it is not possible to show hidden columns or hide displayed columns.
    > > I want users to be able to do this so that they can adjust the detail that
    > > is printed for their own purposes but I want the content of the sheet
    > > protected.
    > > Is there any way to do this?

    >
    > --
    >
    > Dave Peterson
    >


  4. #4
    Colin_Bizfine
    Guest

    Re: Protected worksheet, showing and hiding Grouped detail

    Tried it. Dave, you are an absolute genius - works exactly as I wanted.
    Many Thanks!

    "Colin_Bizfine" wrote:

    > Thanks Dave, I will give that a try
    >
    > "Dave Peterson" wrote:
    >
    > > 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
    > > 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:
    > > http://www.mvps.org/dmcritchie/excel/getstarted.htm
    > >
    > > Colin_Bizfine wrote:
    > > >
    > > > I have column data that is grouped. When I apply protection to the worksheet
    > > > it is not possible to show hidden columns or hide displayed columns.
    > > > I want users to be able to do this so that they can adjust the detail that
    > > > is printed for their own purposes but I want the content of the sheet
    > > > protected.
    > > > Is there any way to do this?

    > >
    > > --
    > >
    > > Dave Peterson
    > >


  5. #5
    Dave Peterson
    Guest

    Re: Protected worksheet, showing and hiding Grouped detail

    Glad it worked for you.

    Colin_Bizfine wrote:
    >
    > Tried it. Dave, you are an absolute genius - works exactly as I wanted.
    > Many Thanks!
    >
    > "Colin_Bizfine" wrote:
    >
    > > Thanks Dave, I will give that a try
    > >
    > > "Dave Peterson" wrote:
    > >
    > > > 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
    > > > 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:
    > > > http://www.mvps.org/dmcritchie/excel/getstarted.htm
    > > >
    > > > Colin_Bizfine wrote:
    > > > >
    > > > > I have column data that is grouped. When I apply protection to the worksheet
    > > > > it is not possible to show hidden columns or hide displayed columns.
    > > > > I want users to be able to do this so that they can adjust the detail that
    > > > > is printed for their own purposes but I want the content of the sheet
    > > > > protected.
    > > > > Is there any way to do this?
    > > >
    > > > --
    > > >
    > > > Dave Peterson
    > > >


    --

    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