D doop Guest Aug 1, 2002 #1 I am trying to load the contents from a 3 column listbox, into an array anyone got any suggestions. Thanks
I am trying to load the contents from a 3 column listbox, into an array anyone got any suggestions. Thanks
J Jon K Registered User. Local time Today, 16:32 Joined May 22, 2002 Messages 2,209 Aug 2, 2002 #2 The code:- Dim col As Integer Dim row As Integer Dim i As Integer Dim j As Integer col = ListBoxName.ColumnCount - 1 row = ListBoxName.ListCount - 1 Dim yourArray() ReDim yourArray(col, row) For i = 0 To col For j = 0 To row yourArray(i, j) = ListBoxName.Column(i, j) Next j Next i
The code:- Dim col As Integer Dim row As Integer Dim i As Integer Dim j As Integer col = ListBoxName.ColumnCount - 1 row = ListBoxName.ListCount - 1 Dim yourArray() ReDim yourArray(col, row) For i = 0 To col For j = 0 To row yourArray(i, j) = ListBoxName.Column(i, j) Next j Next i