Code:Option Explicit Private Sub Command1_Click() MsgBox "there are " & List1.ListCount & " items in the listbox" MsgBox List1.List(List1.ListIndex) 'the currently selected item End Sub Private Sub Form_Load() Dim i As Integer For i = 0 To 10 List1.AddItem "item " & i Next i End Sub




Reply With Quote