gpt4 book ai didi

vba - [Excel][VBA] 如何在图表中画一条线?

转载 作者:行者123 更新时间:2023-12-02 07:32:45 25 4
gpt4 key购买 nike

请查看此图片以清楚地了解我的问题: enter image description here

最佳答案

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

关于vba - [Excel][VBA] 如何在图表中画一条线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5678667/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com