From Xojo Documentation
Gets the selection status of the current row.
Selected is True if the row passed is selected. This property can be used to determine if the row is selected. For example,
For Each row As ListBoxRow In ListBox.Rows
If row.Selected Then rowsSelected = rowsSelected + 1
Getting the list of selected rows
If you allow the ListBox to have multiple items selected (see SelectionType), you may want to establish a list of all the rows selected. The following example shows how to achieve that. The ListBox is named ListBox1.