Autofilter does not work on protected w/s even when "checked to allow" ??

E

EagleOne

2003, 2007

Why does Autofilter not work on a protected w/s even when "checked to allow" ??

On the particular w/s, I checked the dialog box to allow Autofilter.

Further, I used the following VBA resulting with the same problem:

Sub workbook_open()
With Worksheets("My Sheet Name")
.Protect , userinterfaceonly:=True
.EnableOutlining = True
.EnableAutoFilter = True
End With

NOTE: If I unprotect the w/s, I can toggle autofilter.

BTW, the workbook in question is saved as 2003 with 2007.

Any thoughts appreciated.

EagleOne
 
E

EagleOne

Good question Ron!

Well, the answer is "same problem!" on both the 2003 & 2007 installs.

I even selected all "Allow User To" boxes on the 2003 machine.
Then I saved the file after selecting the boxes to ascertain if that
would make any difference, it did not.

EagleOne
 
G

Gord Dibben

You must be in filter mode before protecting the sheet with "allow user to",
then autofilter will be allowed.


Gord Dibben MS Excel MVP
 
E

EagleOne

Gord,

Excellent! I misunderstood what "Allow user to filter" meant.
If I initiate Autofilter before protecting the w/s then the user can use the autofilter.

I had assumed that any user wold be allowed to apply and unapply the filtermode
on any protected w/s.

My expectation was in error.
 
E

EagleOne

Thanks for "stopping by." Gord nailed the answer.

I had a bad assumption as to the user being able to apply/unapply autofilter.
The allowance of use was for just using the autofilter, only if, initiated before the protection is
applied.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top