I am working with Excel 2007 and I am trying to get all Line Chart Markers to be the same color, shape and size. I am also trying to set the Line Color to No Color.
I receive a runtime error 1004 , not valid for current chart, for the line that tries to set the marker background or foreground color.
I don't have much experience at all, I've been trying to piece this together from random posts.
Any help on how to set the Line Color to No Color, and getting the Marker colors to match would be greatly appreciated.
Thanks,
This is the code I have so far:
Sub Macro1()
Dim cht As Chart
Dim sr As Series
Set cht = ActiveSheet.ChartObjects("Chart 10").Chart
Set ax = cht.Axes(xlCategory)
For Each sr In cht.SeriesCollection
sr.MarkerStyle = xlMarkerStyleDiamond
sr.MarkerSize = 10
'sr.MarkerBackgroundColorIndex = xlnone
'sr.MarkerForegroundColor = xlnone
Next
End Sub
I receive a runtime error 1004 , not valid for current chart, for the line that tries to set the marker background or foreground color.
I don't have much experience at all, I've been trying to piece this together from random posts.
Any help on how to set the Line Color to No Color, and getting the Marker colors to match would be greatly appreciated.
Thanks,
This is the code I have so far:
Sub Macro1()
Dim cht As Chart
Dim sr As Series
Set cht = ActiveSheet.ChartObjects("Chart 10").Chart
Set ax = cht.Axes(xlCategory)
For Each sr In cht.SeriesCollection
sr.MarkerStyle = xlMarkerStyleDiamond
sr.MarkerSize = 10
'sr.MarkerBackgroundColorIndex = xlnone
'sr.MarkerForegroundColor = xlnone
Next
End Sub