Link to home
Start Free TrialLog in
Avatar of growedup
growedup

asked on

assign properties to array elements

What is the best approach for creating my own properties to items in an array?

For example, I will have an array of places.  The Array will be populated by a list created by the user on an excel worksheet.  I would like each place to have properties, such as name, etc., etc.  Some properties will be assigned through the list the user created, others will be assigned from external data (Web Query).  

I'm thinking (after being setup properly) assigning a value to the property would look something like this: place(i).name = "Hell".

Any insight is appreciated, thanks.
ASKER CERTIFIED SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
crate an array within the array
properteis[0] = "hell" ' Name
properteis[1] = .. ' other property
...

Places(i,properties(x))
Places(i,properties(x)) is not in the ccoorect syntax
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of growedup
growedup

ASKER

For this project, declaring a type is the best solution.  Using a dictionary is a great solution as well, but is too complex for this project.  I will definately be considering it for future projects though.
Thanks for all the fast inputs everyone!