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!

Array of arrays 1

Status
Not open for further replies.

domt

Programmer
Mar 13, 2001
115
US
Say you have an array of 2 dimensional arrays of labels, thus:

Label10(0) Label10(1) Label10(2) Label10(3) Etc.

Label11(0) Label11(1) Label11(2) Label11(3) Etc.

Label12(0) Label12(1) Label12(2) Label12(3) Etc.

Label13(0) Label13(1) Label13(2) Label13(3) Etc.

Etc.

Since (I suppose) you can’t multi dimension the labels, is it possible to string together something like: “Label” & A & “(“ & B & “)” to represent a generalized label?
Since you’d end up with a string you’d have to convert it somehow to use it.
Dom
 
I assume you are speaking of label controls.

You can do something like this:

Dim MyLabels( xxx , yyy ) as Label

with the xxx as the number of rows, and yy as the number of columns. So if your labels were, for example, 10 rows and 5 columns it would be.

Dim MyLabels(9,4) as Label

( remember you have a 0 element in there also )

Then you would have to set the elements in the array to the actual control.

Dim X as Integer
For X = 0 to 5
Set MyLabels(0,X) = Label10(X)
Next X

And so on for each of your label names.

Then you can refer to a label in the array with it's position.

Is this what you wanted to do?

Robert
 
It works great!
Thanks Vampire for your help, I appreciate it very much.
Dom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top