Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Using Outline commands in a protected worksheet

I have grouped some columns together and have protected the worksheet. I am
wanting to be able to use the show/hide details commands without having to
remove the protection from the worksheet as this will be a shared document.
Does anybody have any ide how this can be achieved, i am using Excel 2007.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Using Outline commands in a protected worksheet

If you already have the outline/subtotals/autofilter 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
'If .FilterMode Then
' .ShowAllData
'End If
End With
End Sub

It needs to be reset each time you open the workbook. (Earlier versions of
excel don't remember it after closing the workbook. IIRC, xl2002+ will remember
the allow autofilter setting under tools|Protection|protect sheet, but that
won't help when you're filtering via code.)

kjl38 wrote:

I have grouped some columns together and have protected the worksheet. I am
wanting to be able to use the show/hide details commands without having to
remove the protection from the worksheet as this will be a shared document.
Does anybody have any ide how this can be achieved, i am using Excel 2007.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Using Outline commands in a protected worksheet

Unfortunately this does not appear to help as it still does not allow the
Show/hide detail option. I receive a message requesting that the protection
is removed from the worksheet. As this is going to be used by other users I
do not want them to be able to alter any formatting, however i do want them
to be able to hide grouped rows and columns to make the spreadsheet more user
friendly. Any ideas!

"Dave Peterson" wrote:

If you already have the outline/subtotals/autofilter 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
'If .FilterMode Then
' .ShowAllData
'End If
End With
End Sub

It needs to be reset each time you open the workbook. (Earlier versions of
excel don't remember it after closing the workbook. IIRC, xl2002+ will remember
the allow autofilter setting under tools|Protection|protect sheet, but that
won't help when you're filtering via code.)

kjl38 wrote:

I have grouped some columns together and have protected the worksheet. I am
wanting to be able to use the show/hide details commands without having to
remove the protection from the worksheet as this will be a shared document.
Does anybody have any ide how this can be achieved, i am using Excel 2007.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Using Outline commands in a protected worksheet

I think you didn't do it correctly.

Maybe you didn't use the correct worksheet name. Maybe you didn't use the the
correct password. Maybe you didn't put the code in the correct location.

Try it again.

kjl38 wrote:

Unfortunately this does not appear to help as it still does not allow the
Show/hide detail option. I receive a message requesting that the protection
is removed from the worksheet. As this is going to be used by other users I
do not want them to be able to alter any formatting, however i do want them
to be able to hide grouped rows and columns to make the spreadsheet more user
friendly. Any ideas!

"Dave Peterson" wrote:

If you already have the outline/subtotals/autofilter 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
'If .FilterMode Then
' .ShowAllData
'End If
End With
End Sub

It needs to be reset each time you open the workbook. (Earlier versions of
excel don't remember it after closing the workbook. IIRC, xl2002+ will remember
the allow autofilter setting under tools|Protection|protect sheet, but that
won't help when you're filtering via code.)

kjl38 wrote:

I have grouped some columns together and have protected the worksheet. I am
wanting to be able to use the show/hide details commands without having to
remove the protection from the worksheet as this will be a shared document.
Does anybody have any ide how this can be achieved, i am using Excel 2007.


--

Dave Peterson


--

Dave Peterson
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
Group and Outline on a Protected Sheet AccessHelp Excel Discussion (Misc queries) 13 February 18th 10 04:03 PM
Using Group and Outline with Protected Cells Cbruns Excel Worksheet Functions 1 January 13th 09 09:59 PM
How can I allow an outline to be collapsed on a protected sheet? LynnAnnO Excel Worksheet Functions 0 June 8th 05 05:39 PM
How to use outline data (grouped rows) in a protected worksheet? biometris Excel Discussion (Misc queries) 1 January 17th 05 10:51 PM
How to use outline data (grouped rows) in a protected worksheet? biometris Excel Discussion (Misc queries) 0 January 17th 05 09:47 AM


All times are GMT +1. The time now is 11:39 PM.

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

About Us

"It's about Microsoft Excel"