用循环
for i=0 to list1.listcount-1
    if list1.list(i).selected then
       msgbox list1.list(i)
    end if
next

解决方案 »

  1.   

    不好意思,判断写错了。For i = 0 To List1.ListCount - 1
        If List1.Selected(i) Then
           MsgBox List1.List(i)
        End If
    Next
      

  2.   

    用API:
    Public Const LB_GETCURSEL = &H188
    Public Const LB_GETSELITEMS = &H191
    Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    1.Single Selected ListBox
    iSelected=SendMessage(ListBox.hwnd, LB_GETCURSEL, 0, 0)2.Multi-Selected ListBox
        Dim nSelCount As Integer    nSelCount = ListBox.SelCount    Dim nSelIndex() As Long
        ReDim nSelIndex(1 To nSelCount)    SendMessage ListBox.hwnd, LB_GETSELITEMS, nSelCount, nSelIndex(1)
    存在数组nSelIndex()中
      

  3.   

    For i = 0 To List1.ListCount - 1
        If List1.Checked(i) Then     '不是复选框时用Selected,是复选框时用Checked
           MsgBox List1.List(i)
        End If
    Next