MS Excel Macro: Subscript out of range (Run-time error '9')

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • teambau
    New Member
    • May 2010
    • 3

    MS Excel Macro: Subscript out of range (Run-time error '9')

    Hi folks, I recorded a macro in Excel that copies data from one worksheet to another and then plots said data into various charts. I'm not a programmer so I'm unsure what exactly is wrong. Here is an excerpt of the macro:

    Code:
        ActiveWorkbook.RefreshAll
        ActiveSheet.ListObjects("Table_SE_Query").Range.AutoFilter Field:=12, _
            Criteria1:="="
        ActiveWindow.ScrollColumn = 2
        ActiveWindow.ScrollColumn = 1
        Range("A20:L623").Select
        Selection.Copy
        Sheets("Sheet15").Select
        ActiveWindow.ScrollColumn = 2
        ActiveWindow.ScrollColumn = 1
        Range("A20").Select
        ActiveSheet.Paste
    I tried marking line 2 as a comment and it seems to run through the rest just fine.
Working...