listview中有一个多选框,如何对所选的项编写代码,用什么方法?高分请教

解决方案 »

  1.   

    dim li as listitem
    for each li in listview1.listitems
       if li.checked then
          '做事
          ...
       end if
    next
      

  2.   

    Private Sub Command1_Click()
            Dim vItem As ListItem
            With ListView1
                For Each vItem In .ListItems
                    If vItem.Checked Then
                       Debug.Print vItem.Text
                    End If
                Next
            End With
    End Sub