Dim ss As New ArrayList
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
If ss.Count > 0 Then
Dim j As Integer
For j = 0 To ListBox1.SelectedItems.Count - 1
If ss.Contains(ListBox1.SelectedItems(j)) = False Then
MessageBox.Show(ListBox1.SelectedItems(j).ToString)
End If
Next
Else
MessageBox.Show(ListBox1.SelectedItem.ToString)
End If
ss.Clear()
ss.AddRange(ListBox1.SelectedItems)
End Sub