Quote:
A ListBox control displays a list of items from which the user can select one or more. If the number of items exceeds the number that can be displayed, a scroll bar is automatically added to the ListBox control.
If no item is selected, the ListIndex property value is -1. The first item in the list is ListIndex 0, and the value of the ListCount property is always one more than the largest ListIndex value.
To add or delete items in a ListBox control, use the AddItem or RemoveItem method. Set the List, ListCount, and ListIndex properties to enable a user to access items in the ListBox. Alternatively, you can add items to the list by using the List property at design time.
|
That's from the msdn libaray. And you said there was nothing on the web about list boxes :-)
Anyways, to do what you want (or at least what i think you want to do), you would use the Selected property of the Listbox and a loop of your choosing. He's some more info about the selected property.
Quote:
|
Returns or sets the selection status of an item in a FileListBox or ListBox control. This property is an array of Boolean values with the same number of items as the List property. Not available at design time.
|
So now i'll show you in code.
for x=0 to (myListBox.ListCount - 1) Step 1
if (myListBox.Selected == true) then
'do something with the item, like put it an array for later
'use, or you could even write it to the text file from here.
end if
Next x
anyways, if i read your post right, that sould be what you need. you could use a do while loop or any other loop you want, but i jus tplain like for loops :-)