Hi. I have a listbox which contains a large list of items (RowSource Type: "Table/Query"). I would like to store or remove the selected items in an array with distinct values. Currently I achieve this with the following code:
This will probably work fine, but considering the possible large amount of data selected in the listbox, and the fact that with system defined objects usually for loops are the slowest choice, I wondred whether there is any faster method to convert the Listbox.SelectedItems into an array. Also is it possible to convert all data in a listbox, selected or not, into an array without looping through them?
I will put my questiosn regarding comparing and appending the arrays into a new thread
Tanks in advance
Code:
For Each varItem In sourceList.ItemsSelected
varSelectedValueArray(iCount) = sourceList.Column(0, varItem)
Next varItem
' Some code to compare and append varSelectedValueArray to targetArray
I will put my questiosn regarding comparing and appending the arrays into a new thread

Tanks in advance