03-2010
Black
Ich habe folgendes Problem, und zwar habe ich einen Code der in 2010 funktioniert aber in 03 bekomme ich einen Laufteitfehler 1004
"die xvalues-eigenschaft des series-objektes kann nicht festgelegt werden"
hier mein code:
On Error Resume Next
Sheets("Tap1").Select
ActiveChart.ChartArea.Select
For x = 3 To 40
ActiveChart.SeriesCollection(3).Delete
Next x
On Error GoTo 0
ActiveChart.SeriesCollection(1).Values = "='Daten-SRT1'!R12C" & 26 & ":R" & 11 + Anz_Fz & "C" _
& 26 ActiveChart.SeriesCollection(1).XValues = "='Daten-SRT1'!$A$12:$A$" & 11 + Anz_Fz
y = 1
For x = 1 To 22
If Sheets("Daten-SRT1").Cells(8, x + 1).Value = 1 And Sheets("Daten-SRT1").Cells(7, x + 1). _
Value > 1 Then
y = y + 1
If y > 2 Then
ActiveChart.SeriesCollection.NewSeries
End If
ActiveChart.SeriesCollection(y).Values = "='Daten-SRT1'!R12C" & x + 1 & ":R" & 11 + Anz_Fz & "C" _
& x + 1
Spalte_Alphanum = Replace(Replace(Sheets("Daten-SRT1").Cells(4711, x + 1).Address, "$", ""), " _
4711", "")
'ActiveChart.SeriesCollection(y).Name = "='Daten-SRT1'!" & Spalte_Alphanum & "7"
ActiveChart.SeriesCollection(y).Name = Sheets("Daten-SRT1").Cells(7, x + 1).Value & ", " & _
Sheets("Daten-SRT1").Cells(6, x + 1).Value
End If
If x = 22 And y = 1 Then
ActiveChart.SeriesCollection(2).Values = "='Daten-SRT1'!R12C" & x + 1 & ":R" & 11 + Anz_Fz & "C" _
& x + 1
Spalte_Alphanum = Replace(Replace(Sheets("Daten-SRT1").Cells(4711, x + 1).Address, "$", ""), " _
4711", "")
ActiveChart.SeriesCollection(2).Name = Sheets("Daten-SRT1").Cells(7, x + 1).Value & ", " & _
Sheets("Daten-SRT1").Cells(6, x + 1).Value
End If
Next x
Das fett makierte wird als fehler angegeben.
Jemand eine idee?
Vielen dank für die Hilfe
Gruss