Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" skrev i melding ... I have two buttons the first calls on this macro which I recorded: Sheets("FILES SENT").Select Selection.AutoFilter Field:=10, Criteria1:="OK Case" ActiveWindow.SmallScroll ToRight:=-5 Selection.AutoFilter Field:=5, Criteria1:="=*house*", Operator:=xlOr, _ Criteria2:="=*workflow*" The macro is supposed to use two filters in columns J(ie-10) and 5(ie-E), but I get a message Run time error "1004" Autofilter mehod of Range class failed. Similarly I have another button which would show all the records again, Sheets("FILES SENT").Select Selection.AutoFilter Field:=10 Selection.AutoFilter Field:=5 Range("A2").Select Again the error shows, where am I going wrong, I'm using Office 97. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, its looks like I didn't identify the range which caused the
problem. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
whats wrong with this? | Excel Discussion (Misc queries) | |||
Whats wrong with this? | Excel Discussion (Misc queries) | |||
Whats wrong with this code? | Excel Programming | |||
Whats Wrong with this?? | Excel Worksheet Functions | |||
Whats wrong? | Excel Programming |