D'accord Merci,
Il ne doit redimensionner qu'un seule graphique(les autres seront déjà sur la feuille), j'ai donc fait ceci :
Sub creationgraphsem2()
'Semestre 1'
Range("T16:V16").Select
ActiveSheet.Shapes.AddChart2(201, xlColumnClustered).Select
Application.CutCopyMode = False
ActiveChart.FullSeriesCollection(1).Delete
ActiveChart.SeriesCollection.NewSeries
ActiveChart.FullSeriesCollection(1).Name = "=val!$T$16"
ActiveChart.FullSeriesCollection(1).Values = "=val!$U$18:$V$18"
ActiveChart.SeriesCollection.NewSeries
ActiveChart.FullSeriesCollection(2).Name = "=val!$T$23"
ActiveChart.FullSeriesCollection(2).Values = "=val!$U$25:$V$25"
ActiveChart.SeriesCollection.NewSeries
ActiveChart.FullSeriesCollection(3).Name = "=val!$T$30"
ActiveChart.FullSeriesCollection(3).Values = "=val!$U$32:$V$32"
ActiveChart.FullSeriesCollection(3).XValues = "=val!$U$16:$V$16"
ActiveChart.HasLegend = True
ActiveChart.HasTitle = True
ActiveChart.ChartTitle.Text = "Fiabilité & Disponibilité des machines - Janvier/Février/Mars"
ActiveChart.Parent.Name = "Graphique1"
ActiveChart.FullSeriesCollection(1).Select
ActiveChart.FullSeriesCollection(1).ApplyDataLabels
ActiveChart.FullSeriesCollection(2).Select
ActiveChart.FullSeriesCollection(2).ApplyDataLabels
ActiveChart.FullSeriesCollection(3).Select
ActiveChart.FullSeriesCollection(3).ApplyDataLabels
ActiveChart.Axes(xlValue).MinimumScale = 0
ActiveChart.Axes(xlValue).MaximumScale = 1
Application.CommandBars("Format Object").Visible = False
Call redimensionnergraphique("Graphique 1")
End Sub
Sub redimensionnergraphique(ByVal NomDuGraphique As String)
Dim xRg As Range
Dim xChart As ChartObject
Set xChart = ActiveSheet.ChartObjects(NomDuGraphique)
Select Case NomDuGraphique
Case "Graphique1"
Set xRg = Range("I48:Q74")
End Select
With xChart
.Top = xRg(1).Top
.Left = xRg(1).Left
.Width = xRg.Width
.Height = xRg.Height
End With
Set xChart = Nothing
End Sub
Mais une erreur s'affiche : L'élement portant ce nom est introuvable
Merci