[Excel][VBA] How to draw a line in a graph?
问题 Please view this image to get my clearly question: 回答1: 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 回答2: Excellll's answer is incomplete. If you simply add this data to what is