A
Al Eaton
I have a series of dynamic range names (i.e.. PX1, PX2, PX3, PX4, ect). I
want to set up a loop to use each range name. I tried something like this
which does not work:
Dim RngNbr As Integer, iRow As Integer
RngNbr = 1
Sheets("HistData").Select
'Select range PX1, PX2, PX3, PX4 by changing the value of RngNbr
Set pxRge = Range("PX & RngNbr")
ActiveSheet.ChartObjects("Chart 41").Activate
With ActiveChart.Axes(xlValue)
.MinimumScale = 0.97 *
Application.WorksheetFunction.Min(pxRge)
.Crosses = xlCustom
.CrossesAt = 0
.ReversePlotOrder = False
.ScaleType = xlLinear
End With
Any ideas? I would also like the select different charts with a similar
method.
want to set up a loop to use each range name. I tried something like this
which does not work:
Dim RngNbr As Integer, iRow As Integer
RngNbr = 1
Sheets("HistData").Select
'Select range PX1, PX2, PX3, PX4 by changing the value of RngNbr
Set pxRge = Range("PX & RngNbr")
ActiveSheet.ChartObjects("Chart 41").Activate
With ActiveChart.Axes(xlValue)
.MinimumScale = 0.97 *
Application.WorksheetFunction.Min(pxRge)
.Crosses = xlCustom
.CrossesAt = 0
.ReversePlotOrder = False
.ScaleType = xlLinear
End With
Any ideas? I would also like the select different charts with a similar
method.