Glaswegian
06-26-2007, 06:50 AM
Hi all
Stuck again!
I have information going to a hidden sheet via an input form. The information goes to columns A to L inclusive. Col A is simply a counter that increments by 1 each time data is input. So far so good. I'm now trying to retrieve some of that data and drop it into a listbox. I want to bring 3 columns to the listbox, A, E and H. The number of rows of data in the sheet will increase over time.
The listbox will therefore show a brief summary of records previously input - the three columns are the counter, customer name, and one other piece of info. Users will be able to click on a row and retrieve the full record (that bit I can do fine).
I can't work out how to load the relevant info into an array and then populate the listbox! (arrays were never something I fully understood.) My sad efforts so far amount to this
Dim x As Long
Dim myArray()
For x = 1 To Sheets("Records").Range("A2", Range("A65536").End(xlUp)).Row
myArray(x, 0) = x
Next x
frmSelectRecord.lbxRecords.List() = myArray
but it's not really much.
Any help greatly appreciated.
Thanks.
Stuck again!
I have information going to a hidden sheet via an input form. The information goes to columns A to L inclusive. Col A is simply a counter that increments by 1 each time data is input. So far so good. I'm now trying to retrieve some of that data and drop it into a listbox. I want to bring 3 columns to the listbox, A, E and H. The number of rows of data in the sheet will increase over time.
The listbox will therefore show a brief summary of records previously input - the three columns are the counter, customer name, and one other piece of info. Users will be able to click on a row and retrieve the full record (that bit I can do fine).
I can't work out how to load the relevant info into an array and then populate the listbox! (arrays were never something I fully understood.) My sad efforts so far amount to this
Dim x As Long
Dim myArray()
For x = 1 To Sheets("Records").Range("A2", Range("A65536").End(xlUp)).Row
myArray(x, 0) = x
Next x
frmSelectRecord.lbxRecords.List() = myArray
but it's not really much.
Any help greatly appreciated.
Thanks.