View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
blopreste3180 blopreste3180 is offline
external usenet poster
 
Posts: 4
Default AutoFilter method of Range class failed

HELP QUICK!
I am trying to set an autofilter macro so when a user presses a button in a
worksheet, it automatically filters the data in a separate sheet. Here is my
code abbreviated (removed many range lines)
Selection.AutoFilter Field:=2, Criteria1:="19A"
ActiveWindow.LargeScroll ToRight:=7
ActiveWindow.ScrollColumn = 91
NOTE: (many activewindow.scrollcolumn=#'s left out)
ActiveWindow.SmallScroll Down:=3
ActiveWindow.SmallScroll ToRight:=3
ActiveWindow.SmallScroll Down:=-12
ActiveWindow.SmallScroll ToRight:=-3
Range("B53").Select
ActiveWindow.FreezePanes = True
ActiveWindow.SmallScroll ToRight:=7
Range("U53:U127").Select
Range("U127").Activate
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,R[-74]C:R[-1]C)"
Range("U53:U127").Select
ActiveWindow.SmallScroll ToRight:=152
Range("FH53:FH127").Select
Range("FH127").Activate
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,R[-74]C:R[-1]C)"
Range("FH53:FH127").Select
ActiveWindow.LargeScroll ToRight:=3
ActiveWindow.ScrollColumn = 192
NOTE (many activewindow.scrollcolumn=#'s left out)
Range("A53").Select

I am trying to get this button to work and am on a tight deadline, quick
help is certainly appreciated.
End Sub