ListView1.SelectedItems(0).Index()
'does the listcontain items??
If Me.ListBox1.Items.Count() > 0 Then
'If no selection, choose last list item.
If Me.ListBox1.SelectedIndex = -1 Then
Me.ListBox1.SelectedIndex = Me.ListBox1.Items.Count() - 1
End If
End If