09-04-2009, 07:48 PM
Hi Basanth,
I guess I am still confused at the disconnect here. It seems the 1st variable adj(0) has both values stored. I cannot separate them successfully. I understand the arrays concept but am not familiar with the Split function.
So I updated my code to print out the 2 values after the For statement:
When I run this, msgbox adj(0) prints out:
TRAIN1
TRAIN2
and msgbox adj(1) throws an error:
Subscript out of range: '[number: 1]'
Line (37): "msgbox adj(1)".
I will look more into the Split function, but if you have further suggestions I appreciate the help...
-egun
I guess I am still confused at the disconnect here. It seems the 1st variable adj(0) has both values stored. I cannot separate them successfully. I understand the arrays concept but am not familiar with the Split function.
So I updated my code to print out the 2 values after the For statement:
Code:
adj = Split(val2, VBLF)
For i = Lbound(adj) to Ubound(adj)
msgbox adj(i)
Next
msgbox adj(0)
msgbox adj(1)
TRAIN1
TRAIN2
and msgbox adj(1) throws an error:
Subscript out of range: '[number: 1]'
Line (37): "msgbox adj(1)".
I will look more into the Split function, but if you have further suggestions I appreciate the help...
-egun