Mr.FutureCoder
New Member
- Joined
- Aug 2, 2011
- Messages
- 10
Hi,
As shown below, What I am trying to is
sub array1()
Dim sName as string
Dim commodity(3) as string
Dim NG_DJ(3) as string
commodity(1)="NG"
commodity(2)="CL"
commodity(3)="HO"
NG(1) = "03": NG(2) = "05": NG(3) = "07"
CL(1) = "01": CL(2) = "02": CL(3) = "03"
HO(1) = "06": HO(2) = "08": HO(3) = "10"
'**Here is the problem**'
sName= commodity(1) (1)
end sub
Output of the sName should be "03" as commodity(1) is "NG" and then it should take NG(1) and retrieve the "03". Any help would be appreciated highly. Thanks.
As shown below, What I am trying to is
sub array1()
Dim sName as string
Dim commodity(3) as string
Dim NG_DJ(3) as string
commodity(1)="NG"
commodity(2)="CL"
commodity(3)="HO"
NG(1) = "03": NG(2) = "05": NG(3) = "07"
CL(1) = "01": CL(2) = "02": CL(3) = "03"
HO(1) = "06": HO(2) = "08": HO(3) = "10"
'**Here is the problem**'
sName= commodity(1) (1)
end sub
Output of the sName should be "03" as commodity(1) is "NG" and then it should take NG(1) and retrieve the "03". Any help would be appreciated highly. Thanks.