• Advertisement

Archived

This topic is now archived and is closed to further replies.

array that holds two values

This topic is 5272 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a way in VB that i can get an array or some datatype that holds two values, like a name and a value for instance? I can''t just use two diff arrays because each value has to go with each name and i sort the names, thanks guys! ----------------------------------------------------------- Like a sponge!

Share this post


Link to post
Share on other sites
Advertisement
An array can hold different types of variables ($,% etc..) So just make an array with your data you want in it.


[edited by - anthonyrh1 on August 16, 2003 9:42:47 PM]

Share this post


Link to post
Share on other sites
you can make your own type, thusly:

type MyDataType
name as string
data as integer
end type

and then you have your array:

MyArray as MyDataType(1 to whatever)

and access thusly:

myDataType(index).name
myDataType(index).data

Share this post


Link to post
Share on other sites

  • Advertisement