I have code to automate making some graphs. Since these will eventually be printed out to black and white I want to make sure that there are distinct markers for each series. I have a range called Shapes that lists 4 different markerstyles
xlDiamond
xlTriangle
xlCircle
xlSquare
Sometimes there are 4 series in the graph, other times there are only 2 or 3 so I've used a loop to format each series.
But when I run the following code I get an error "Unable to set MarkerStyle Property of the Series class"
For u = 1 to DataRange.Areas.count
For j = 1 to DataRange.Areas(u).Rows.Count
ActiveChart.SeriesCollection(j).Select
With Selection
.MarkerStyle = shapes(j)
.MarkerBackgroundColorIndex = colors(j)
.MarkerForegroundColorIndex = colors(j)
.MarkerSize = 5
End With
What am I doing wrong. Does the data in my Shapes range have to be in a particular format? Any help would be greatly appreciated.
Bookmarks