By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,583 Members | 594 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,583 IT Pros & Developers. It's quick & easy.

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

P: 3
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:

Expand|Select|Wrap|Line Numbers
  1.     ActiveWorkbook.RefreshAll
  2.     ActiveSheet.ListObjects("Table_SE_Query").Range.AutoFilter Field:=12, _
  3.         Criteria1:="="
  4.     ActiveWindow.ScrollColumn = 2
  5.     ActiveWindow.ScrollColumn = 1
  6.     Range("A20:L623").Select
  7.     Selection.Copy
  8.     Sheets("Sheet15").Select
  9.     ActiveWindow.ScrollColumn = 2
  10.     ActiveWindow.ScrollColumn = 1
  11.     Range("A20").Select
  12.     ActiveSheet.Paste
I tried marking line 2 as a comment and it seems to run through the rest just fine.
May 27 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.