#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Grouping

Very simple question, but one I cannot manage to answer.....

Using XL2003, is it possible to protect a worksheet, but still have the
grouping buttons work?

Is this possible using XL2007?



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Grouping

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.)

I've never tested it in xl2007.

Paul W Smith wrote:

Very simple question, but one I cannot manage to answer.....

Using XL2003, is it possible to protect a worksheet, but still have the
grouping buttons work?

Is this possible using XL2007?


--

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
To sum by grouping Dan Excel Discussion (Misc queries) 1 January 15th 09 01:51 AM
grouping Pammy Excel Discussion (Misc queries) 1 March 29th 07 06:22 AM
Grouping John Excel Discussion (Misc queries) 1 November 4th 06 08:51 PM
Row Grouping Justin Philips Excel Programming 4 April 4th 06 05:42 PM
Grouping Jennifer Brodie Excel Worksheet Functions 1 January 24th 06 04:51 PM


All times are GMT +1. The time now is 12:45 AM.

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"