whats wrong with my macros

  • Thread starter Thread starter cribology - ExcelForums.com
  • Start date Start date
C

cribology - ExcelForums.com

I have two buttons the first calls on this macro which I recorded

Sheets("FILES SENT").Selec
Selection.AutoFilter Field:=10, Criteria1:="OK Case
ActiveWindow.SmallScroll ToRight:=-
Selection.AutoFilter Field:=5, Criteria1:="=*house*"
Operator:=xlOr,
Criteria2:="=*workflow*

The macro is supposed to use two filters in columns J(ie-10) an
5(ie-E), but I get a messag
Run time error "1004"
Autofilter mehod of Range class failed

Similarly I have another button which would show all the record
again,

Sheets("FILES SENT").Selec
Selection.AutoFilter Field:=1
Selection.AutoFilter Field:=
Range("A2").Selec

Again the error shows, where am I going wrong, I'm using Office 97
 
Hi

Three suspects:
Your active cell is outside the list to filter ? If so, add
Range("A2").Select before the Autofilter command. No, do it anyway.

FILES SENT is protected ?

Excel97 error: The button has its TakeFocusOnClick property set to True ? My
main suspect, this one.

HTH. Best wishes Harald

"cribology - ExcelForums.com"
 
Thanks, its looks like I didn't identify the range which caused the
problem.
 
Back
Top