473,327 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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:

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
  13.  
I tried marking line 2 as a comment and it seems to run through the rest just fine.
May 27 '10 #1
0 1751

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

Similar topics

2
by: Mrs Howl | last post by:
I don't know if there's even a way to do what I want. I click on a button in an Access form, and it opens an instance of Excel, and opens a workbook and runs a macro that's in it. So far, fine,...
0
by: Alex | last post by:
i have a module in Access which opens an existing Excel file and envokes a macro within the Excel file to draw graphs. now i am trying to convert the Excel macro to an Access one so that the...
3
by: maryam | last post by:
Hi i have some data in excel....I want to perform a series of operations on them and output the results to excel again. I know that some stuff could be used with VBA. however in this special case...
2
by: CR | last post by:
How do you "step into" an excel macro when using the VB.NET debugger? I'm using excel 2000. Here's is how I did it with VB6: Dim objExcel As Excel.Application objExcel = New...
2
by: cr113 | last post by:
I just upgraded from Office 2000 to Office 2003. My VB.NET Excel macro calls don't work any longer. Here is how I make my Excel macro call from VB.NET: Dim objExcel as Excel.Application ...
0
by: KH Tay | last post by:
Hi, I can able to run the Excel Macro command in VB6. Unfortunately , VB.Net always prompt Array - no declaring. I've insert the Excel references, and it is still not working. Can anyone help me ?...
0
by: modularmix | last post by:
Does anyone know how to run the Excel Macro for two different spreadsheets in parallel. Here is the code that works sequentially. Workbooks.Open Filename:="C:\Documents and...
1
by: etangman | last post by:
Hello people. This is quick and easy I just can't figure out the correct syntax. Help appreciated. I'm attempting to create an Excel macro that replaces cell contents on one sheet with a...
0
by: kittu513 | last post by:
Hi I need some help regarding the alignment of the value in the active cell. my code is like this (its VB code to implement an Excel macro) Range("B1").Select ActiveCell.Offset(50,...
1
MitchR
by: MitchR | last post by:
Good Morning Folks; I have a question that is pretty far fetched but here goes nothing... I am looking to find a way to insert a macro into an Excel command button located in an Access VBA...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.