|
-
Mar 22nd, 2006, 02:25 AM
#1
Thread Starter
New Member
How to initialize a two-dimensional Array
Hello Everybody,
We can initialize a one dimensional array in VB 6.0 as shown below
---------------------
Dim Data(), N As Integer
Private Sub Combo1_Click()
Text1.Text = Combo1.Text
End Sub
Private Sub Form_Load()
Data = Array("Abc", "Pqr", "Uvw", "Xyz")
For N = 0 To UBound(Data)
Combo1.AddItem Data(N)
Next
'This will initially display the first page
Combo1.ListIndex = 0
End Sub
--------------------
But Similarly how to initialize a two-dimensional Array. Following line is coming out of an error.
Dim Data1()
Data1(1 To 2, 1 To 3) = ((“EVA”, “MSA”), (“RA”, “MA8000”), (“Xyz”, “Pqr”))
I have huge data like this to be assigned to a two-dimensional array:
EVA 72GB 11111-111
MSA 36GB 22222-222
MSA 36GB 33333-333
MSA 72GB 44444-444
RA 18GB 55555-555
RA 36GB 66666-666
And so on…..
Thanks in Advance !!
Regards
Susanta
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|