Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
AutoFilter method of Range class failed
I see a lot of activewindow, but have you ever declared your activesheet? I
see a lot of macros using ranges fail because the sheet has never been set active. "blopreste3180" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autofilter method of range class failed | Excel Programming | |||
What did I do? (Select Method of Range Class Failed ) | Excel Programming | |||
select method of range class failed | Excel Programming | |||
Insert method of range class failed | Excel Programming | |||
AutoFilter method of Range Class Failed | Excel Programming |