Bonjour,

J'ai créer un graphique simple à partir d'un tableau sous excel.

Je voudrais savoir comment mettre à jour automatiquement les echelles des ordonnées.

Mon code actuel :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 16.08.2010 by fd151
'
' Keyboard Shortcut: Ctrl+a
'
    Charts.Add
    ActiveChart.ChartType = xlLine
    ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1")
    ActiveChart.SeriesCollection.NewSeries
    ActiveChart.SeriesCollection(1).XValues = "=Sheet1!R8C1:R8C14"
    ActiveChart.SeriesCollection(1).Values = "=Sheet1!R3C1:R3C14"
    ActiveChart.SeriesCollection(1).Name = "=""Mois/FTE"""
    ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
    With ActiveChart
        .HasTitle = True
        .ChartTitle.Characters.Text = "Mois/FTE"
        .Axes(xlCategory, xlPrimary).HasTitle = True
        .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "MOIS"
        .Axes(xlValue, xlPrimary).HasTitle = True
        .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "FTE"
    End With
    ActiveChart.HasDataTable = False
End Sub