clvestin
02-14-2007, 09:07 AM
I must assign some chart titles from names in an array.
The particular array of names depends on a selection from a listbox.
coldata0 = Array("c", "d", "e", "f", "g", "h", "i", "j", "k")
coldata1 = Array("c", "d", "f", "g")
coldata2 = Array("c", "d", "f", "g")
coldata3 = Array("c", "g", "e", "f")
coldata4 = Array("c", "c", "x", "z")
coldata5 = Array("c", "c", "x", "z")
Then
If m = 0 Then coldata = coldata0
If m = 0 Then namdata = namdata0
If m = 1 Then coldata = coldata1
If m = 1 Then namdata = namdata1
If m = 2 Then coldata = coldata2
If m = 2 Then namdata = namdata2
If m = 3 Then coldata = coldata3
If m = 3 Then namdata = namdata3
If m = 4 Then coldata = coldata4
If m = 4 Then namdata = namdata4
If m = 5 Then coldata = coldata5
If m = 5 Then namdata = namdata5
However, i've trie a statement like
coldata = "coldata" & m
whereupon i produce the string "coldata1", eg.
Syntactically, I'm missing something. In the immediate window i can easily reassign usingcoldata = coldata3
and all is well(I can locate by index and all).I've tried a number of the conversion functions(cvar, cstr) but to no avail.
The particular array of names depends on a selection from a listbox.
coldata0 = Array("c", "d", "e", "f", "g", "h", "i", "j", "k")
coldata1 = Array("c", "d", "f", "g")
coldata2 = Array("c", "d", "f", "g")
coldata3 = Array("c", "g", "e", "f")
coldata4 = Array("c", "c", "x", "z")
coldata5 = Array("c", "c", "x", "z")
Then
If m = 0 Then coldata = coldata0
If m = 0 Then namdata = namdata0
If m = 1 Then coldata = coldata1
If m = 1 Then namdata = namdata1
If m = 2 Then coldata = coldata2
If m = 2 Then namdata = namdata2
If m = 3 Then coldata = coldata3
If m = 3 Then namdata = namdata3
If m = 4 Then coldata = coldata4
If m = 4 Then namdata = namdata4
If m = 5 Then coldata = coldata5
If m = 5 Then namdata = namdata5
However, i've trie a statement like
coldata = "coldata" & m
whereupon i produce the string "coldata1", eg.
Syntactically, I'm missing something. In the immediate window i can easily reassign usingcoldata = coldata3
and all is well(I can locate by index and all).I've tried a number of the conversion functions(cvar, cstr) but to no avail.