可以在代码中改变的,不过要添加一个颜色对话框
With MSChart.Plot.SeriesCollection(index).DataPoints(-1)
.Brush.Style = VtBrushStyleSolid
.Brush.FillColor.Set red, green, blue
End With
上述代码中的index为具体每一列,因为颜色对话框中显示的颜色值不是RGB格式的,所以要转化一下,red,green,blue用下面的函数把对话框的颜色属性转化为RGB格式的
Public Function RedFromRGB(ByVal rgb As Long) _
As Integer
RedFromRGB = &HFF& And rgb
End Function
Public Function GreenFromRGB(ByVal rgb As Long) _
As Integer
GreenFromRGB = (&HFF00& And rgb) \ 256
End Function
Public Function BlueFromRGB(ByVal rgb As Long) _
As Integer
BlueFromRGB = (&HFF0000 And rgb) \ 65536
End Function