View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Dytham Dytham is offline
external usenet poster
 
Posts: 1
Default Filter on a protected page

I got this to work fine in 2003, but it fails again when workbook is shared :-(

"WT" wrote:

Thank you, I take it the only way is to use code. Does this code work in a
multi-user workbook (shared)?
--
Thank you


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

WT wrote:

When I place filter on the column titles and then protect the page the
filters are inoperable. Any way to change that??
--
Thank you


--

Dave Peterson