在excel中3d走势图中的小圆球及连线是怎样做的,我想学习一下

如题所述

自动绘制直线进度横道图 需要写VBA球球我就不知道了Private Type pointapi
x As Single
y As Single
End Type
Sub drawlines()
Dim i As Integer, j As Integer, n As Integer, p() As pointapi
While ActiveSheet.Shapes.Count > 0
ActiveSheet.Shapes(1).Delete
Wend
n = Range("f65536").End(xlUp).Row
ReDim p(2 To n)
For i = 2 To n
j = 5
Do
j = j + 1
Loop Until Cells(i, j).Font.ColorIndex = 3
p(i).x = 8 + j * Cells(i, j).Width
p(i).y = Cells(i, 1).Top + 0.5 * Cells(i, 1).Height
If i > 2 Then ActiveSheet.Shapes.AddLine p(i - 1).x, p(i - 1).y, p(i).x, p(i).y
Next
End Sub
温馨提示:答案为网友推荐,仅供参考
第1个回答  2013-07-14
没有必要这么麻烦 数据表大把
http://datachart.500wan.com/sd/zoushi/jbzs.shtml
第2个回答  2013-07-14
不会啊
相似回答