Problem with Excel 2000

H

Henne19

When I try to start this macro with Excel 2000 it doesn't work:
Sub ZorY()

With Worksheets("Sheet1").ChartObjects(1).Chart
.HasTitle = False
End With

ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.PlotArea.Select

If Range("$B$7").Value = 1 Then
ActiveChart.SeriesCollection(1).Name = "=Sheet1!$A$2"
ActiveChart.SeriesCollection(1).Values = "=Sheet1!$B$2:$K$2"
ElseIf Range("$B$7").Value = 2 Then
ActiveChart.SeriesCollection(1).Name = "=Sheet1!$A$3"
ActiveChart.SeriesCollection(1).Values = "=Sheet1!$B$3:$K$3"
End If
End Sub

The problem is ActiveChart.SeriesCollection(1).Name!
With Excel 2007 it works. Please help me!

Henne
 
Top