bonjour, ds le fichier ci joint, j'ai 2 graphes (j'en aurais éventuellement 4 plus tard). Mais les données fluctuent dc j'ai un bouton (graphe) avec la macro ci dessous qui me permet de mettre a jour l'echelle du graphe 1. Mais j'aimerais un seul bouton qui me mettent à jour les échelles des graphe 1 & 2 (et éventuellement d'autres graphes que je vais créer plus tard).
macro :
Sub CommandButton1_Click()
Dim Mini As Integer, Maxi As Integer
Dim Plage As String
With ActiveSheet
Plage = "B6:B" & .Range("B3").End(xlDown).Row
Mini = Application.Min(Range(Plage)) - 8
Maxi = Application.Max(Range(Plage)) + 8
With .ChartObjects(1).Chart.Axes(xlValue)
.MinimumScale = Mini
.MaximumScale = Maxi
.MajorUnit = 2
End With
End With
End Sub
merci bcp
macro :
Sub CommandButton1_Click()
Dim Mini As Integer, Maxi As Integer
Dim Plage As String
With ActiveSheet
Plage = "B6:B" & .Range("B3").End(xlDown).Row
Mini = Application.Min(Range(Plage)) - 8
Maxi = Application.Max(Range(Plage)) + 8
With .ChartObjects(1).Chart.Axes(xlValue)
.MinimumScale = Mini
.MaximumScale = Maxi
.MajorUnit = 2
End With
End With
End Sub
merci bcp