Hey guys. I'm a complete newb regarding VBA. I'm trying no create a macro that can read values from cells, and change the scales in a graph according to those values. For the moment I recorded a macro while changing the min X scale, and it looks like this:
Sub TestingScale()
With ActiveChart.Axes(xlCategory)
.MinimumScale = 1
.MaximumScale = 30
.MinorUnitIsAuto = True
.MajorUnit = 1
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
Windows("Tech Notes Index(4).xls").SmallScroll Down:=12
End Sub
This thing increases the X axis scale from 0 to 1. What i want to do is make the .minimumscale and .maximumscale , each read a value from 2 cells in the sheet. Those values will later be buttons, in order to increase, decrease the axis scale.
Help would be much appreciated.
Big thanks
Daniel
Sub TestingScale()
With ActiveChart.Axes(xlCategory)
.MinimumScale = 1
.MaximumScale = 30
.MinorUnitIsAuto = True
.MajorUnit = 1
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
Windows("Tech Notes Index(4).xls").SmallScroll Down:=12
End Sub
This thing increases the X axis scale from 0 to 1. What i want to do is make the .minimumscale and .maximumscale , each read a value from 2 cells in the sheet. Those values will later be buttons, in order to increase, decrease the axis scale.
Help would be much appreciated.
Big thanks
Daniel