Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$D$1" Then Exit Sub
Dim t$
Me.ChartObjects(1).Activate
On Error Resume Next
ActiveChart.SeriesCollection(1).Trendlines(1).Delete 'RAZ
If IsNumeric([B2]) Then _
Application.Dialogs(xlDialogChartTrend).Show , , , , , True
With ActiveChart.SeriesCollection(1).Trendlines(1)
t = .DataLabel.Text
.DisplayEquation = False
End With
With ActiveChart.ChartTitle
.Text = "Tendance " & t
.Left = (ActiveChart.Parent.Width - .Width) / 2
End With
Target.Select
End Sub