man kann zu jedem Punkt der Kurve auf Grafik die
Beschriftung vom Wert einstellen.Ich
brauche aber nur bei Maximum dazu aber auch Datum.
Wie kann man das bewerkstelligen???
Grüsse
Rolf
Option Explicit
Declare Sub Sleep Lib "Kernel32" (ByVal Zeit As Long)
Sub maxwerT()
Dim P As Long, Pts As Points, Pt As Point, SC1 As Series
Dim arrDat
If ActiveSheet.ChartObjects(1).Chart.Type <> 4 Then Exit Sub
Sleep 20
On Error Resume Next
Set SC1 = ActiveSheet.ChartObjects(1).Chart.SeriesCollection(1)
SC1.HasDataLabels = True
P = 1
Set Pts = SC1.Points
For Each Pt In Pts
If Cells(P, 3) = Application.Max([c1:c80]) Then
Pt.DataLabel.Text = Cells(P, 3) & Chr(10) & Cells(P, 1)
Pt.DataLabel.Font.ColorIndex = 2
Pt.DataLabel.Font.Size = 8
Pt.DataLabel.Font.Bold = True
Pt.MarkerStyle = 8
Pt.MarkerSize = 10
Pt.MarkerBackgroundColorIndex = 3
Else
Pt.DataLabel.Text = ""
Pt.MarkerStyle = 8
Pt.MarkerSize = 6
Pt.MarkerBackgroundColorIndex = -4105
End If
P = P + 1
Next
End Sub