Can anyway suggest a way to use the dynamic array SalesNumbersArray() to fill out the XValues for the chart? Or lacking that a better way to fill the values? Thanks.
Code:
' determining number of datapoints
nSeriesDataPoints = (nSeriesTotalDays / nSeriesDivisor)
' initializing array
Dim SalesNumbersArray(nSeriesDataPoints) As Double
' loop for gathering sales
Dim nLoop As Integer
Dim nTotalSales As Double
For nLoop = 0 To (nSeriesDataPoints - 1)
' getting total sales for this iteration
nTotalSales = SUM_SALES_RANGE(sProductCode, nSeriesDivisor, (dStartDate + (nDivisor * nLoop)))
' placing total in array
SalesNumbersArray(nLoop) = nTotalSales
Next nPoints
' adding series
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(nSeriesCounter).Name = sProductCode
ActiveChart.SeriesCollection(nSeriesCounter).XValues = SalesNumbersArray()