D
Dave Dowell
Having created a chart with the VB chartwizard, I want to
control the colors of the series lines (not the
markers). Can anyone tell me how to do that? Below is
the basic code I am using. Using for example
With ActiveChart
..SeriesCollection(1).ColorIndex = 3
End With
does not work.
Thanks in advance. DD
Dim ch As ChartObject
Set ch = Worksheets(wksh).ChartObjects.Add(0, 0, 700,
500)
ch.Chart.ChartWizard Source:=Worksheets
("COLLEGEDATA").Range("a1138"), _
gallery:=xlLine, Format:=4, Title:=wksh & "
Enrollment", _
PlotBy:=xlColumns, CategoryLabels:=1,
SeriesLabels:=1, CategoryTitle:="Date", ValueTitle:="FTES"
ch.Activate
With ActiveChart
.WallsAndGridlines2D = True
.Axes.Item(xlCategory).CategoryType = xlTimeScale
.Axes(xlCategory).TickLabels.NumberFormat = "m/d"
.PlotArea.Interior.ColorIndex = 15
.Axes(xlValue).MinimumScale = 0
.Axes(xlValue).MaximumScale = mx
.Legend.Position = xlLegendPositionRight
.DisplayBlanksAs = xlInterpolated
.Legend.Top = 0
.PlotArea.Top = 15
.PlotArea.Left = 0
.ChartTitle.Top = 0
End With
control the colors of the series lines (not the
markers). Can anyone tell me how to do that? Below is
the basic code I am using. Using for example
With ActiveChart
..SeriesCollection(1).ColorIndex = 3
End With
does not work.
Thanks in advance. DD
Dim ch As ChartObject
Set ch = Worksheets(wksh).ChartObjects.Add(0, 0, 700,
500)
ch.Chart.ChartWizard Source:=Worksheets
("COLLEGEDATA").Range("a1138"), _
gallery:=xlLine, Format:=4, Title:=wksh & "
Enrollment", _
PlotBy:=xlColumns, CategoryLabels:=1,
SeriesLabels:=1, CategoryTitle:="Date", ValueTitle:="FTES"
ch.Activate
With ActiveChart
.WallsAndGridlines2D = True
.Axes.Item(xlCategory).CategoryType = xlTimeScale
.Axes(xlCategory).TickLabels.NumberFormat = "m/d"
.PlotArea.Interior.ColorIndex = 15
.Axes(xlValue).MinimumScale = 0
.Axes(xlValue).MaximumScale = mx
.Legend.Position = xlLegendPositionRight
.DisplayBlanksAs = xlInterpolated
.Legend.Top = 0
.PlotArea.Top = 15
.PlotArea.Left = 0
.ChartTitle.Top = 0
End With