autofilter in protected sheet

T

Tang

I try to have a autofilter in a protected sheet using the following code:

Sub Protect_keep_filter()
With ActiveSheet
.EnableAutoFilter = True
.Protect DrawingObjects:=True, _
contents:=True, Scenarios:=True, _
UserInterfaceOnly:=True
End With
End Sub

However , it seem don't work for both Excel 2000 and Excel 2003.

Is there anyway to work about it?

regards
 
D

Debra Dalgleish

Is the AutoFilter in place?
Do you run the code when the the workbook is opened?
 
Top