Private Sub CommandButton2_Click()
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("Feuil2").Range("J33"), PlotBy:= _
xlColumns
ActiveChart.SeriesCollection(1).XValues = "='Me.ListBox2.List(1,0)'!R7C2:R307C2"
For i = 0 To Me.ListBox2.ListCount - 1
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(i).Values = "='Me.ListBox2.List(i,0), 6)'!R7C4:R307C4"
i = i + 1
Next i
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:= _
"Bidouillegraphique1"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Sécrétion EC en fonction du temps"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Jours"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Sécrétion EC µg/ml"
.DisplayBlanksAs = xlInterpolated
.PlotVisibleOnly = True
.SizeWithWindow = False
End With
Application.ShowChartTipNames = True
Application.ShowChartTipValues = True
End Sub