Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to develope/work with Multidimensional Arrays??? 1

Status
Not open for further replies.

Apollo6

Technical User
Jan 27, 2000
418
US
I am taking a beginners VB class and having trouble grasping how to develope and work with multidimensional arrays. I have to do a project that has a user entering HouseHold information into text boxes; ID#, Members in a household, and total salary. From this input, three reports are needed which extract the information.<br>
Are there any sites out there that have examples that I can look at concerning multidimensional arrays?<br>

 
I would suggest creating a class with the properties:<br>
* ID<br>
* Members<br>
* Salary<br>
<br>
Then create a collection based on this class.<br>
<br>
It will work like a multi-array but easier to add and retreive data.<br>
<br>
Use the Class Builder Add-on to create the classes.<br>
<br>
If you want an example in VB6 please e-mail me (PeteS@bradfordsys.com)<br>
<br>
I hope this helps.
 
Although the previous answer is a better solution, your class probably requires you to use arrays. I do a lot of work with 3D coordinate systems. It may be easier to think of arrays like points. For example:<br>
<br>
Option Base 1<br>
<br>
Const x = 1 <br>
Const y = 2<br>
Const z = 3<br>
<br>
Dim pt1(3) as Double<br>
Dim pt2(3) as Double<br>
<br>
pt1(x)= x coordinate<br>
pt1(y)= x coordinate<br>
pt1(z)= x coordinate<br>
and the same for point two.<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top