dim li as listitem for each li in listview1.listitems if li.checked then '做事 ... end if next
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
for each li in listview1.listitems
if li.checked then
'做事
...
end if
next
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