Necesito ayuda!
Hola
Esto puede ayudarte:
Dim MiGrafico As ChartObject
Dim EscalaMaxima As Double
EscalaMaxima = -1000000000
'Busca la escala máxima
For Each MiGrafico In ActiveSheet.ChartObjects
With MiGrafico
.Activate
.Chart.Axes(xlValue).Select '(xlCategory) para los valores de X
With .Chart.Axes(xlValue)
If EscalaMaxima < .MaximumScale Then
EscalaMaxima = .MaximumScale
End If
End With
End With
Next MiGrafico
'Asigna la escala máxima a todos los graficos
For Each MiGrafico In ActiveSheet.ChartObjects
With MiGrafico
.Activate
.Chart.Axes(xlValue).Select
With .Chart.Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScale = EscalaMaxima
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
End With
Next MiGrafico
Esto puede ayudarte:
Dim MiGrafico As ChartObject
Dim EscalaMaxima As Double
EscalaMaxima = -1000000000
'Busca la escala máxima
For Each MiGrafico In ActiveSheet.ChartObjects
With MiGrafico
.Activate
.Chart.Axes(xlValue).Select '(xlCategory) para los valores de X
With .Chart.Axes(xlValue)
If EscalaMaxima < .MaximumScale Then
EscalaMaxima = .MaximumScale
End If
End With
End With
Next MiGrafico
'Asigna la escala máxima a todos los graficos
For Each MiGrafico In ActiveSheet.ChartObjects
With MiGrafico
.Activate
.Chart.Axes(xlValue).Select
With .Chart.Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScale = EscalaMaxima
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
End With
Next MiGrafico
1 Respuesta
Respuesta de jgirj
1