Hello ,
I' m using a 2D array to populate a MSchart
Dim dataArray(), arrTMP
Dim length, el, strString
strString = "12:00;0.001;12:15;0.000;12:30;0.0002;12:45;0.0003 "
arrTMP = Split(strString, ";")
length = 1
' arrange all elements into 2-dimensional array
For el = 0 To UBound(arrTMP) Step 2
ReDim Preserve dataArray(2, lengte)
dataArray(1, lengte) = arrTMP(el)
dataArray(2, lengte) = arrTMP(el + 1)
lengte = lengte + 1 ' increase index counter
Next
MSChart1(1).ChartData = dataArray
but the problem is for a MSchart the array must be filled as follow:
For el = 0 To UBound(arrTMP) Step 2
ReDim Preserve dataArray(lengte,2)
dataArray(lengte,1) = arrTMP(el)
dataArray(lengte,2) = arrTMP(el + 1)
lengte = lengte + 1 ' increase index counter
Next
and here the problem is:
In VBScript you can ReDim any array including multi-dimentioned arrays - but only the last dimention can be increased
And me I need to increase the first dimention..
Can somebody help me to solve that..?
thank you in advance for your help