ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Protection & Grouping (https://www.excelbanter.com/excel-discussion-misc-queries/86801-re-protection-grouping.html)

ALK

Protection & Grouping
 
Super info! This solved the problem for me and works well with other macro
code. Thanks Dave.

"Dave Peterson" wrote:

I use xl2002 and there's an option to "use Autofilter"--but nothing for
grouping.

You can protect the worksheet in code:

But this setting isn't remembered between closing/reopening the workbook. (So
Auto_open is a nice spot for it.)

Option Explicit
Sub auto_open()

Dim wks As Worksheet
Set wks = Worksheets("sheet1")

With wks
.Protect Password:="hi", userinterfaceonly:=True
.EnableAutoFilter = True
'or
.EnableOutlining = True
End With

End Sub

EnableAutofilter/enableoutlining--depending on what you mean by grouped.

And autofilter or the outlining has to be applied beforehand.

0013 wrote:

Sorry, forgot to mention that I was talking about in 2003.

Even when I check all of the check boxes in the sheet protection dialog, I
still get an error.

Any ideas? Even if it's through VBA?

"Frank Kabel" wrote:

Hi
depending on your Excel version (I think starting in 2003) you can set
these option in the protection dialog

--
Regards
Frank Kabel
Frankfurt, Germany


0013 wrote:
Is there any way to protect a sheet, but still allow people to group
and ungroup rows and columns?

Thanks,



--

Dave Peterson




All times are GMT +1. The time now is 08:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com