View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Masol Masol is offline
external usenet poster
 
Posts: 1
Default Setting name of series - run-time error 1004

When I record macro in Excel 2003 and set name of series on a chart the
following code is saved:

ActiveChart.SeriesCollection(1).Name = "=Workbook1!R1C1"

When I do the same in Excel 2007, it generates:

ActiveChart.SeriesCollection(1).Name = "=Workbook1!$A$1"

Code from Excel 2003 does not work in Excel 2007 and vice versa - in both
cases I get run-time error 1004. How can I create code compatibile with both
versions of Excel?