I would like to take three single dimensional arrays and populate a listbox on a form. Each array should fill one column.
I got this code off line and it doesn't work either.
Code Below.
Not sure what I am doing wrong. I have used the additem, column and rowsource properties.
Dim MyArray() As Double
ReDim MyArray(3, 6)
Dim i As Single
List1.ColumnCount = 3 'The 1st list box contains 3 data columns
'Load integer values into first column of MyArray
For i = 0 To 5
MyArray(i, 0) = i
Next i
'Load columns 2 and 3 of MyArray
MyArray(0, 1) = "Zero"
MyArray(1, 1) = "One"
MyArray(2, 1) = "Two"
MyArray(3, 1) = "Three"
MyArray(4, 1) = "Four"
MyArray(5, 1) = "Five"
MyArray(0, 2) = "Zero"
MyArray(1, 2) = "Un ou Une"
MyArray(2, 2) = "Deux"
MyArray(3, 2) = "Trois"
MyArray(4, 2) = "Quatre"
MyArray(5, 2) = "Cinq"
List1.ListIndex() = MyArray
Thank you for you assistance in advance
Greg
I got this code off line and it doesn't work either.
Code Below.
Not sure what I am doing wrong. I have used the additem, column and rowsource properties.
Dim MyArray() As Double
ReDim MyArray(3, 6)
Dim i As Single
List1.ColumnCount = 3 'The 1st list box contains 3 data columns
'Load integer values into first column of MyArray
For i = 0 To 5
MyArray(i, 0) = i
Next i
'Load columns 2 and 3 of MyArray
MyArray(0, 1) = "Zero"
MyArray(1, 1) = "One"
MyArray(2, 1) = "Two"
MyArray(3, 1) = "Three"
MyArray(4, 1) = "Four"
MyArray(5, 1) = "Five"
MyArray(0, 2) = "Zero"
MyArray(1, 2) = "Un ou Une"
MyArray(2, 2) = "Deux"
MyArray(3, 2) = "Trois"
MyArray(4, 2) = "Quatre"
MyArray(5, 2) = "Cinq"
List1.ListIndex() = MyArray
Thank you for you assistance in advance
Greg