If one has chosen the multiple selection option on a listview control and one selects a few rows, how does one establish which rows(indexes) have been selected. Can anyone help. Thanks. Peekay
You need to use a for loop to go through the whole of the listview control from start to end.<br>
<br>
for i = 1 to listview.listitems.count<br>
if listview.listitems(i).selected = true then<br>
{your code}<br>
end if<br>
next i<br>
<br>
Its in the MultiSelect properties example on the MSDN CD that comes with Visual Studio 6.01<br>
<br>
James <br>
A little different way<br>
<br>
<br>
For a = 0 To List1.ListCount - 1<br>
If List1.Selected(a) = True Then<br>
Debug.Print "Got it"<br>
End If<br>
Next<br>
' this will let you know how many were selected<br>
Debug.Print List1.SelCount<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.