Populate list box with multi-dimensional array
Graham,
Does this work for you:
Private Sub CommandButton1_Click()
Dim arr(1 To 8, 1 To 8) As String
Dim i As Long
Dim j As Long
'Fill array, but can come from a Range or wherever
For i = 1 To 8
For j = 1 To 8
arr(i, j) = "Item " & i & ", " & j
Next
Next
With ListBox1
.Clear
.ColumnCount = UBound(arr, 2)
.List = arr()
End With
End Sub
NickHK
End Sub
"Graham Whitehead" wrote in message
...
Hi, I was just wondering if it possible to populate a list box with an
array
that was say 8 x 8. Basically, I organised a whole bunch of data and
would
like to present it to a user inside a listbox on a form.
|