Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How to show or hide outlined data option in a protected worksheet?

I've created a worksheet for others to use with grouped and outlined sections
so the user can view the information either expanded with detail or collapsed
to hide the detail. This worksheet also contains certain cells that are
protected from the user making changes to them. When the protection is
activated and I try to use the hide or show detail option I get this error
message. "You cannot use this command on a protected sheet" Is there a way
to protect certain cells and allow the user to show and hide detail depending
upon their preference.

I'm using Excel 2003, MS Windows XP Pro.

Thanks!
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: How to show or hide outlined data option in a protected worksheet?

Yes, there is a way to protect certain cells and allow the user to show and hide detail depending on their preference. Here's how you can do it:
  1. Select the cells that you want to protect.
  2. Right-click on the selected cells and choose "Format Cells" from the context menu.
  3. In the "Format Cells" dialog box, go to the "Protection" tab.
  4. Uncheck the "Locked" checkbox and click OK.
  5. Now, protect the worksheet by going to "Tools" "Protection" "Protect Sheet".
  6. In the "Protect Sheet" dialog box, check the "Use AutoFilter" and "Use PivotTable reports" checkboxes.
  7. Click OK to protect the worksheet.

Now, you can use the "Group" and "Outline" options to show or hide the detail in the protected worksheet. To do this, follow these steps:
  1. Select the rows or columns that you want to group or outline.
  2. Go to "Data" "Group and Outline" "Group" or "Outline".
  3. The grouped or outlined sections will be collapsed by default.
  4. To expand a section, click on the "+" sign next to it.
  5. To collapse a section, click on the "-" sign next to it.

Note that the "Group" and "Outline" options will only work on the unprotected cells in the protected worksheet. If you try to use these options on the protected cells, you will get the error message "You cannot use this command on a protected sheet".
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default How to show or hide outlined data option in a protected worksheet?

The only way to do what you want is to set the sheet's EnableOutlining
property to True and to protect the sheet via macro with the
UserInterfaceOnly parameter set to true. This is an example of the code to
do that:

Sheet1.EnableOutlining = True
Sheet1.Protect "password", True, True, True, True

This code has to be run whenever the workbook is opened because
UserInterfaceOnly is not a setting that is saved with the workbook. So it
has to be run by the Workbook_Open event sub or Sub Auto_Open.

--
Jim
"Listasista" wrote in message
...
I've created a worksheet for others to use with grouped and outlined
sections
so the user can view the information either expanded with detail or
collapsed
to hide the detail. This worksheet also contains certain cells that are
protected from the user making changes to them. When the protection is
activated and I try to use the hide or show detail option I get this error
message. "You cannot use this command on a protected sheet" Is there a
way
to protect certain cells and allow the user to show and hide detail
depending
upon their preference.

I'm using Excel 2003, MS Windows XP Pro.

Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How to show or hide outlined data option in a protected worksh

That's exactly what I needed!

I had to get some help on the macro part (thus my delay in my response) and
now it's working great. You taught me and macro helper something. Tx!

"Jim Rech" wrote:

The only way to do what you want is to set the sheet's EnableOutlining
property to True and to protect the sheet via macro with the
UserInterfaceOnly parameter set to true. This is an example of the code to
do that:

Sheet1.EnableOutlining = True
Sheet1.Protect "password", True, True, True, True

This code has to be run whenever the workbook is opened because
UserInterfaceOnly is not a setting that is saved with the workbook. So it
has to be run by the Workbook_Open event sub or Sub Auto_Open.

--
Jim
"Listasista" wrote in message
...
I've created a worksheet for others to use with grouped and outlined
sections
so the user can view the information either expanded with detail or
collapsed
to hide the detail. This worksheet also contains certain cells that are
protected from the user making changes to them. When the protection is
activated and I try to use the hide or show detail option I get this error
message. "You cannot use this command on a protected sheet" Is there a
way
to protect certain cells and allow the user to show and hide detail
depending
upon their preference.

I'm using Excel 2003, MS Windows XP Pro.

Thanks!




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve data from all of the worksheet within the file dannyboy213 Excel Worksheet Functions 1 March 22nd 06 07:51 PM
Saving data in a worksheet within a workbook Homeuser Excel Discussion (Misc queries) 2 August 21st 05 10:49 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 06:37 AM
how to hide rows in a protected sheet Prakash Excel Worksheet Functions 7 January 18th 05 03:42 PM
Why can't I show or hide rows in an outline on a protected sheet? rwlass Excel Discussion (Misc queries) 1 December 9th 04 05:38 PM


All times are GMT +1. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"