Page 1 of 1

AddArray problem

Posted: Wed Oct 13, 2004 12:27 pm
by 6924590
Dear Support

I have newbie like question:

Uppon adding a simple array to the chart with the AddArray method, i get the following error message:

"Variant or safe array index out of bounds"

The following simple VB code wo'nt work:

Dim X_ARRAY(10) As Single
Dim Y_ARRAY(10) As Single
Dim I As Integer

Randomize
For I = 1 To 10

X_ARRAY(I) = CSng(I)
Y_ARRAY(I) = Rnd * 10#

Debug.Print I, Y_ARRAY(I)

Next I

' Now add it to the chart.

frmAddArray.TChart1.AddSeries scLine
frmAddArray.TChart1.Series(0).AddArray UBound(Y_ARRAY), Y_ARRAY(), X_ARRAY()
'

What can be the problem?

Tx in advance, regards

Andras

Posted: Wed Oct 13, 2004 3:12 pm
by Pep
Hi Andras,

which TeeChart Pro version are you using ? I've just test it here using the v7.02 with VB6 and works fine.

Posted: Wed Oct 13, 2004 3:54 pm
by 6924590
[quote="Pep"]Hi Andras,

which TeeChart Pro version are you using ? I've just test it here using the v7.02 with VB6 and works fine.[/quote


I've got V6.

Regards

Andras

Posted: Wed Oct 13, 2004 5:07 pm
by Pep
Hi Andras,

it also works fine using the v6.05 downloadable from our web site (at the private customers download page).
If you still having problems I can post an example into the steema.public.atachments newsgroup so you can test it.