Sniperbooya
Registered User.
- Local time
- Today, 14:13
- Joined
- Jan 30, 2015
- Messages
- 16
Hi guys,
I have come across an issue with one of our sheets, which we (apparently) do not use that often, since i did not hear anything about it..
We have got a graph with a little VBA to add additional series to the graph.
This works perfectly with Office 2003, but 2010 gives us an 'invalid parameter' error which i can not get my head around.
Code:
It seems to flag up when it gets to the
Part of the code..
Any ideas?
I have come across an issue with one of our sheets, which we (apparently) do not use that often, since i did not hear anything about it..
We have got a graph with a little VBA to add additional series to the graph.
This works perfectly with Office 2003, but 2010 gives us an 'invalid parameter' error which i can not get my head around.
Code:
Code:
Private Sub CommandButton3_Click()
Charts("Grafiek1").Unprotect Password:="01FGSlab1962"
With Charts("Grafiek1")
.HasTitle = True
.ChartTitle.Text = Range("A8").Text
End With
Charts("Grafiek1").Protect Password:="01FGSlab1962"
If Not Range("I35") = "" Then
Charts("Grafiek1").Unprotect Password:="01FGSlab1962"
Charts("Grafiek1").SeriesCollection.Add _
Source:=ActiveWorkbook.Worksheets("Zeefanalyse").Range("I35:I41")
serieslabels = True
Charts("Grafiek1").SeriesCollection(Range("I35").Value).Border.ColorIndex = 10
Charts("Grafiek1").SeriesCollection(Range("I35").Value).MarkerBackgroundColorIndex = 10
Charts("Grafiek1").SeriesCollection(Range("I35").Value).MarkerForegroundColorIndex = 10
Charts("Grafiek1").SeriesCollection(Range("I35").Value).XValues = _
Worksheets("Zeefanalyse").Range("H36:H41")
Charts("Grafiek1").SeriesCollection.Add _
Source:=ActiveWorkbook.Worksheets("Zeefanalyse").Range("J35:J41")
serieslabels = True
Charts("Grafiek1").SeriesCollection(Range("J35").Value).Border.ColorIndex = 3
Charts("Grafiek1").SeriesCollection(Range("J35").Value).MarkerBackgroundColorIndex = 3
Charts("Grafiek1").SeriesCollection(Range("J35").Value).MarkerForegroundColorIndex = 3
Charts("Grafiek1").SeriesCollection(Range("J35").Value).XValues = _
Worksheets("Zeefanalyse").Range("H36:H41")
Charts("Grafiek1").Protect Password:="01FGSlab1962"
Sheets("Zeefanalyse").Unprotect Password:="01FGSlab1962"
Range("K11") = 1
Sheets("Zeefanalyse").Protect Password:="01FGSlab1962"
End If
Sheets("Grafiek1").Visible = True
Sheets("Grafiek1").Activate
End Sub
It seems to flag up when it gets to the
Code:
Charts("Grafiek1").SeriesCollection(Range("I35").Value).Border.ColorIndex = 10
Charts("Grafiek1").SeriesCollection(Range("I35").Value).MarkerBackgroundColorIndex = 10
Charts("Grafiek1").SeriesCollection(Range("I35").Value).MarkerForegroundColorIndex = 10
Part of the code..
Any ideas?