How do I programatically apply a ShapeStyle to a set of Points from a single Series of a Chart using vba? It seems I need a "Shapes" object that contains only the points from the series I am trying to format?
Some information is here: http://peltiertech.com/WordPress/programming-excel-2007-2010-autoshapes-with-vba/ under the "Setting Border and Fill Styles" section
I have pseudocode but I have no idea how to create the Shapes object with only the items I want in it
' Applies desired shapestyle to a specific series of a chart
Sub ApplyShapeStyle(ch As Chart, sr As Series, ss As ShapeStyle)
' Somehow create a "Shapes" object that
' contains all the points from the series as Shape objects
Dim shps as Shapes
'pseudocode
shps.Add(<all points from series>)
shps.ShapeStyle = ss
End Sub
Like I mentioned in my comment (And I could be wrong) there is no shape property available for the
DataLabel
which will let you change the.ShapeStyle
. However I managed to achieve what you want using a complex routine.LOGIC
.ShapeStyle
to this shapeDataLabel
like Fill, Border color, Border Style, Shadow etc with that from the shape.CODE
SCREENSHOT
Just Setting some of the
.Fill
properties gives me this formsoShapeStylePreset38