R
raydenl
Hi, I have a VBA function like so:
Code:
--------------------
Private Sub AddSeries(ByVal strName As String, ByVal rngValues As Range, ByVal rngValuesX As Range, ByVal xlAxis As XlAxisGroup)
With Charts("Chart").SeriesCollection.NewSeries
.AxisGroup = xlAxis
.ChartType = xlLine
.Name = strName
.Values = rngValues
.XValues = rngValuesX
End With
End Sub
--------------------
Sometimes I add a series to the Primary Y axis and other times to the
Secondary.
How can I determine how many series are on the Primary and how many on
the secondary?????
Application could begin with an unknown number of series already
present on each axis so can't use a counter.
Cheers,
Rayden
Code:
--------------------
Private Sub AddSeries(ByVal strName As String, ByVal rngValues As Range, ByVal rngValuesX As Range, ByVal xlAxis As XlAxisGroup)
With Charts("Chart").SeriesCollection.NewSeries
.AxisGroup = xlAxis
.ChartType = xlLine
.Name = strName
.Values = rngValues
.XValues = rngValuesX
End With
End Sub
--------------------
Sometimes I add a series to the Primary Y axis and other times to the
Secondary.
How can I determine how many series are on the Primary and how many on
the secondary?????
Application could begin with an unknown number of series already
present on each axis so can't use a counter.
Cheers,
Rayden