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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

two-dimensional array of controls

Status
Not open for further replies.

vaat

MIS
May 14, 2002
27
NL
Does anyone here know how I can implemend a two-dimensional array of shape controls.

When i make an control array it is one-dimensional. Does anyone have some sample code ?
 

Don't think that is possible. Directly anyways. As an Object maybe.

Good Luck

 
what do you mean as an object maybe ?
 

I have never tried it but lets see...
Ah...
Hmmm... this seems to work
[tt]
Private Sub Form_Load()

Dim O(1, 1) As Object

Set O(0, 0) = Text1
Set O(0, 1) = Text2
Set O(1, 0) = Text3
Set O(1, 1) = Text4

O(0, 0).Left = 0
O(0, 0).Top = 0

O(0, 1).Left = 0
O(0, 1).Top = O(0, 0).Height + 30

O(1, 0).Left = 0
O(1, 0).Top = O(0, 1).Top + O(0, 1).Height + 30

O(1, 1).Left = 0
O(1, 1).Top = O(1, 0).Top + O(1, 0).Height + 30

End Sub
[/tt]

add 4 text boxes (not array (text1,text2,text3,text4)) and run.

Good Luck


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top