Strange behavior Chart.SeriesCollection(n).Values property
Hallo Andy,
Thanks for replying so quickly.
The problem is that there is a limit to the length of the data series
formula. Integer values are ok but the floating point exceeds the
length. Therefore as you have discovered reducing the decimals or number
of points will allow it to work again.
I changed the code: now it doesn't set the XValues and Values directly, but
it sets a worksheet name instead, and the chart points to the worksheet
names (see below). This works without limitation. Do you perhaps know why
this makes a difference? The number of points is the same. Is it solely the
fact that the Formula cannot be too long?
Thanks again.
Emile
Sub drawAxis()
Dim xAxis(1 To 40), yAxis(1 To 40), n As Integer
For n = 1 To 40
xAxis(n) = 0.005
yAxis(n) = 5
Next n
ThisWorkbook.Names.Add "xAxis", xAxis
ThisWorkbook.Names.Add "yAxis", yAxis
End Sub
|