Macro to change Chart Marker

Joined
Sep 15, 2009
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top