Using filter on protected sheets

P

Pascale

Can you please tell me how to activate the filter button once the shee
has been protected? Once the sheet is protected it appears that th
filter is disabled (ie grayed out)

Thanks in advanc
 
T

Travis Benedict

Add the filters before protecting the sheet. Then when protecting the
sheet, select enable autofiltering in the options.
 
D

Dave Peterson

Just to add to Travis's post:

This option was added in xl2002 (under tools|protection).

If you're using xl2k or earlier, you can do it in code:

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

Dave Peterson

Oops. Autofilter--not outlining!

Option Explicit
Sub auto_open()

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

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

End Sub
 
Top