I have 2 charts that are created with a macro. But the defaulting colors are not very good. I have tried to change them using all the basic commands that I have found selecting the active chart, plot area and then color index but it doesn't work. I have my code below. The chart is on sheet 4 but the data is on sheet 1.
Any suggestions would be great. Thank you
Tmac
Dim mychtobj As ChartObject
Set mychtobj = Wks4.ChartObjects.Add _
(Left:=250, Width:=700, Top:=15, Height:=500)
With mychtobj.Chart
.ChartType = xlXYScatterLinesNoMarkers
With .SeriesCollection.NewSeries
.Values = Range(Cells(2, 31), Cells(increment, 31))
.XValues = Range(Cells(2, 33), Cells(increment, 33))
.Name = "Chromatogram"
End With
.Axes(xlCategory).MinimumScale = Wks2.Cells(32, 1)
.Axes(xlCategory).MaximumScale = Wks2.Cells(33, 1)
.Axes(xlCategory).MajorUnit = 0.2
.Axes(xlCategory).MinorUnit = 0.1
End With
Bookmarks