Hello,
I'm trying to generate multiples charts using VBA (2 per lines)
I'm only able to generate always at the same place
Here is my code:
Thanks for your help
I'm trying to generate multiples charts using VBA (2 per lines)
I'm only able to generate always at the same place
Here is my code:
VBA Code:
Sub generate_chart()
Dim chrt As ChartObject
Sheets("Main").Activate
For i = 2 To 5
Set chrt = Sheets("Main").ChartObjects.Add(Left:=10, Width:=270, Top:=10, Height:=210)
chrt.Chart.SetSourceData Source:=Sheets("Calc").Range("A1:T1,A" & i & ":T" & i)
chrt.Chart.ChartType = xlLine
Next i
End Sub
Thanks for your help