Minstrel
04-19-2007, 01:58 AM
I need help with formatting charts created from pivot tables.
I have already asked this question in the MrExcel forum but have had no success.:(
I'm new to VBA and am trying to adapt code that was done for me to create the charts.
I have managed to code the formatting I want, but I can't figure out how to cope with charts which have more or less data points than I've coded.
Anyone have any ideas?
Sorry, should have pasted the code
With .SeriesCollection(1).Points(1)
.Border.Weight = xlHairline
.Border.LineStyle = xlAutomatic
.InvertIfNegative = False
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, _
Degree:=0.231372549019608
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = 54
'End With
End With
With .SeriesCollection(1).Points(2)
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, _
Degree:=0.231372549019608
.Fill.ForeColor.SchemeColor = 18
End With
With .SeriesCollection(1).Points(3)
I have already asked this question in the MrExcel forum but have had no success.:(
I'm new to VBA and am trying to adapt code that was done for me to create the charts.
I have managed to code the formatting I want, but I can't figure out how to cope with charts which have more or less data points than I've coded.
Anyone have any ideas?
Sorry, should have pasted the code
With .SeriesCollection(1).Points(1)
.Border.Weight = xlHairline
.Border.LineStyle = xlAutomatic
.InvertIfNegative = False
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, _
Degree:=0.231372549019608
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = 54
'End With
End With
With .SeriesCollection(1).Points(2)
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, _
Degree:=0.231372549019608
.Fill.ForeColor.SchemeColor = 18
End With
With .SeriesCollection(1).Points(3)