wie kann man 2 Punte im Punktiagramm im Punkt Diagramm verbinden?
(in VBA)
gruß
swen
Private Sub Messlinien()
Dim xWerte As Variant
Dim yWerte As Variant
ReDim xWerte(1 To 2)
ReDim yWerte(1 To 2)
xWerte(1) = -7
yWerte(1) = -6
xWerte(2) = 8
yWerte(2) = -6
With ActiveChart
.SeriesCollection.NewSeries
.SeriesCollection(.SeriesCollection.Count).XValues = xWerte
.SeriesCollection(.SeriesCollection.Count).Values = yWerte
End With
ActiveChart.SeriesCollection(2).Select
With Selection.Border
.ColorIndex = 3
.Weight = xlThin
.LineStyle = xlContinuous
End With
With Selection
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = 1
.MarkerStyle = xlPlus
.Smooth = False
.MarkerSize = 3
.Shadow = False
End With
'y -Meslinie
xWerte(1) = 8
yWerte(1) = 4
xWerte(2) = 8
yWerte(2) = -11
With ActiveChart
.SeriesCollection.NewSeries
.SeriesCollection(.SeriesCollection.Count).XValues = xWerte
.SeriesCollection(.SeriesCollection.Count).Values = yWerte
End With
ActiveChart.SeriesCollection(3).Select
With Selection.Border
.ColorIndex = 5
.Weight = xlThin
.LineStyle = xlContinuous
End With
With Selection
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = 1
.MarkerStyle = xlPlus
.Smooth = False
.MarkerSize = 3
.Shadow = False
End With
End Sub