Bonjour,

voici mon code pour insérer un graphique sous vba.
mais il ne reconnait pas la fonction "setsourcedata"

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Sub graph()
Dim graph As Chart
 
Set graph = Chart.Add()
With graph
Name = tracé
ChartType = xlXYScatterLines
SetSourceData calcul2.Range("i10:k109")
HasTitle = True
HasLegend = True
chartitle.Text = "titre du graphique"
End With
 
End Sub
pourriez vous m'éclaircir la situation.

merci