本文介绍了[Excel] [VBA]如何在图中画一条线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请查看此图像以获得清楚的问题:
Please view this image to get my clearly question:
推荐答案
Sub Tester()
Dim s, d
d = #4/18/2011# * 1 ''a bit of a hack, since I could figure out how to plot a date directly
With ActiveSheet.ChartObjects("Chart 1").Chart 'adjust to suit
Set s = .SeriesCollection.NewSeries()
With s
.Name = ""
.XValues = Array(d, d)
.Values = Array(90, 0)
.MarkerStyle = xlMarkerStyleNone
.Border.Color = vbRed
End With
End With
End Sub
这篇关于[Excel] [VBA]如何在图中画一条线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!