2003 to 2007 updates

  • Thread starter Thread starter playerbigdog
  • Start date Start date
P

playerbigdog

I saved my old 2003 excel macro program (.xls) as the 2007 macro enabled
version (.xlsm). I wen through the program and changed to run commands to
open the appropriate document and run from the appropriate databases. Now,
the program gets to a certain point and says that the subscript is out of
range. This is the program:
Sub GEN_DATA()
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
'This generates all of the data as well as make all of the colums and
'sort data for the charts.
'--------------------------------------------------------------------------
Sheets("myVar1").Select
Application.ScreenUpdating = False
The "Sheet("myVar1").Select is what is causing my error. Any thoughts??
 
That means that there is no sheet named myVar1.

Did you really mean:
sheets(myvar1).select
????
 
I just changed it to without the quotes and it is running so far. Thanks for
the quick fix!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top