|
楼主 |
发表于 2011-11-9 01:47
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
嗯解决了
Sub Test()
Dim S As Series
Dim X, Y
Set S = ActiveSheet.ChartObjects(1).Chart.SeriesCollection(1)
Y = Array(1, 4)
X = Array("2011", "2012")
With S
.Values = Y
.XValues = X
End With
Set S = ActiveSheet.ChartObjects(1).Chart.SeriesCollection(2)
Y = Array(2, 5)
With S
.Values = Y
.XValues = X
End With
Set S = ActiveSheet.ChartObjects(1).Chart.SeriesCollection(3)
Y = Array(3, 6)
'X = Array("E", "F", "G")
With S
.Values = Y
.XValues = X
End With
ActiveSheet.ChartObjects(1).Chart.SeriesCollection.Add Source:=Range("E13:F13"), Rowcol:=xlRows
'X = Array("E", "F", "G")
With S
.Values = Y
.XValues = X
End With
End Sub
|
|