Addressing a named Array

  • Thread starter Thread starter William Foster
  • Start date Start date
W

William Foster

Good morning all,

Does anyone know how to address a named Array, for instance:

Array_States(1) = "New South Wales"

Array_Name = "Array_States"
Value = Array_Name(1)

Therefore, Value = "New South Wales"

I know that this looks very messy, but hopefully you can understand what
I mean.

Basically I have about 20 or 30 arrays that I want to be able to called
via one procedure, and just change the array that each name that I am
referencing.

Any assistance you may be able to provide would be appreciated.

Yours sincerely,

William Foster
 
Good morning all,

Does anyone know how to address a named Array, for instance:

Array_States(1) = "New South Wales"

Array_Name = "Array_States"
Value = Array_Name(1)

Therefore, Value = "New South Wales"

I know that this looks very messy, but hopefully you can understand what
I mean.

Basically I have about 20 or 30 arrays that I want to be able to called
via one procedure, and just change the array that each name that I am
referencing.

Any assistance you may be able to provide would be appreciated.

Yours sincerely,

William Foster

*** Sent via Developersdexhttp://www.developersdex.com***

off the top of my head, I would make use a dictionary or a hashtable
of arrays - depending if the arrays were the same type...
 
Basically I have about 20 or 30 arrays that I want to be able to called
via one procedure, and just change the array that each name that I am
referencing.

How about using dictionarys + lists/arrays instead

For example:

State("New South Wales")(0) = "Some Province/State"
 
Thanks for the tips everybody, I am interested in the dictionary option,
I haven't used that previously.

I will give it a try tomorrow and call out for more help if I need it (I
am trying to be positive, but I am pretty sure I will need it).

Yours sincerely,

William Foster
 
Back
Top