F
feh
I'd like to set the color of the datalabels for my series to be the
same as the series itself.
The following does not work. It would seem that the color codes used
by .interior.color of the series are different from those used for the
font of a selection of a datalabel.
Dim myChrt As Chart
Set myChrt = ActiveChart
Dim oSer As Series
Dim dlabel As DataLabel
Dim oSerColor As String
For Each oSer In myChrt.SeriesCollection
oSerColor = oSer.Interior.Color
oSer.HasDataLabels = True
For Each dlabel In oSer.DataLabels
dlabel.Select
Selection.Font.Color = oSerColor
Next
Next
I'm using office 2007 btw.
Thanks,
Charles
same as the series itself.
The following does not work. It would seem that the color codes used
by .interior.color of the series are different from those used for the
font of a selection of a datalabel.
Dim myChrt As Chart
Set myChrt = ActiveChart
Dim oSer As Series
Dim dlabel As DataLabel
Dim oSerColor As String
For Each oSer In myChrt.SeriesCollection
oSerColor = oSer.Interior.Color
oSer.HasDataLabels = True
For Each dlabel In oSer.DataLabels
dlabel.Select
Selection.Font.Color = oSerColor
Next
Next
I'm using office 2007 btw.
Thanks,
Charles