Par défaut zoomer des courbes en VBA

Bonjour,

Je souhaite effectuer un zoom (zmin;zmax) sur 10 courbes, mais mon programme VBA si dessous s'arrête !

Sub Macro1()
'
' Macro1 Macro

'
zm = 30000
zp = 31000

For G = 1 To 10

ActiveSheet.ChartObjects("Graphique" G).Activate
    ActiveChart.Axes(xlCategory).Select
    ActiveChart.Axes(xlCategory).MinimumScale = zm
    ActiveChart.Axes(xlCategory).MaximumScale = zp

Next G

End Sub
Sub Macro1()
Dim Zmin As Long, Zmax As Long
Dim G As Byte

Zmin = 30000
Zmax = 31000
For G = 1 To 10
    With ActiveSheet.ChartObjects("Graphique " & G).Chart.Axes(xlCategory)
        .MinimumScale = Zmin
        .MaximumScale = Zmax
    End With
Next G
End Sub
Rechercher des sujets similaires à "defaut zoomer courbes vba"