Hi,
This is kinda driving me crazy. Is there any way to concat the value of a counter variable to a variable name to make a new variable name???
e.g.
values1
values2
values3
etc...
This is what I'm trying to do:
The problems are:
- There can be any number of values arrays
- A 2-D array would work well, but the chDataLiteral for Office Web Components ONLY accepts a 1-D array or a comma delim list
Can anyone help me?
This is kinda driving me crazy. Is there any way to concat the value of a counter variable to a variable name to make a new variable name???
e.g.
values1
values2
values3
etc...
This is what I'm trying to do:
Code:
For i = 0 To (count - 1)
ReDim values & i(numberOfCategories - 1)
Next
j = 0
Do While Not rs.EOF
For i = 0 To (count - 1)
If rs("code") <> codes(i) Then
values & i(j) = 0
Else
If IsNull(rs("price")) Then
values & i(j) = 0
Else
values & i(j) = rs("price")
End If
End If
rs.MoveNext
Next
j = j + 1
Loop
For i = 0 To (count - 1)
Set objSeries(i) = objChart.SeriesCollection.Add()
With objSeries(i)
.Caption = codes(i)
.SetData objConstants.chDimCategories, objConstants.chDataLiteral, categories
.SetData objConstants.chDimValues, objConstants.chDataLiteral, values & i
End With
Next
The problems are:
- There can be any number of values arrays
- A 2-D array would work well, but the chDataLiteral for Office Web Components ONLY accepts a 1-D array or a comma delim list
Can anyone help me?