Sub Macro1()
'
Dim numero As Integer
numero = Cells(2, 20).Value
'
'Graph Evolution du nombre de pièces produites
ActiveSheet.ChartObjects("Graphique 5").Activate
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(1).XValues = "='Tableau ventilé'!cells(1,3):cells(2,numero)"
ActiveChart.SeriesCollection(1).Values = "='Tableau ventilé'!cells(17,3):cells(17,numero)"
ActiveChart.SeriesCollection(2).Values = "='Tableau ventilé'!cells(18,3):cells(18,numero)"
ActiveChart.SeriesCollection(3).Values = "='Tableau ventilé'!cells(19,3):cells(19,numero)"
ActiveChart.SeriesCollection(4).Values = "='Tableau ventilé'!cells(20,3):cells(20,numero)"
ActiveWindow.Visible = False
Windows("2007 - Tableau de bord.xls").Activate
Cells(2, 20).Select
ActiveCell.FormulaR1C1 = numero + 1
Range("A1").Select
End Sub