I'm using auto filter in a workbook that may be used by folks with a variety of Excel versions. In my version (2003) I have no problem unsing the following code, hooked to a button to turn the feature on/off
A9:M9 are the headings, which are protected. The rest of the range is unprotected.
I just talked with one of my users who tells me the auto filter on/off button is causing a run time error. I believe he has either Excel 2002 or 2000.
Is there anything I can do to allow this to work for these earlier versions of Excel?
Thanks!
Rich
Code:
Sub AutoFilter_On_Off()
'
Application.ScreenUpdating = False
ActiveSheet.Unprotect ("egssales")
Range("A9:M1009").Select
Selection.AutoFilter
Range("A1").Select
ActiveSheet.Protect ("egssales"), AllowFiltering:=True
Application.ScreenUpdating = True
End Sub
A9:M9 are the headings, which are protected. The rest of the range is unprotected.
I just talked with one of my users who tells me the auto filter on/off button is causing a run time error. I believe he has either Excel 2002 or 2000.
Is there anything I can do to allow this to work for these earlier versions of Excel?
Thanks!
Rich