Skip to content

Instantly share code, notes, and snippets.

@sroccaserra
Created July 28, 2014 09:19
Show Gist options
  • Save sroccaserra/f0436446d14131dde168 to your computer and use it in GitHub Desktop.
Save sroccaserra/f0436446d14131dde168 to your computer and use it in GitHub Desktop.
Adjust Excel Sprint Burndown Chart axis
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("B2")
If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
Module1.ajuster
End If
End Sub
Sub ajuster()
xMax = Sheets("Feuil1").Range("B2")
Sheets("Feuil1").ChartObjects("Graphique 1").Chart.Axes(xlCategory).MaximumScale = xMax
Sheets("Feuil1").ChartObjects("Graphique 1").Chart.Axes(xlValue).MinimumScale = 0
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment