I was using a listbox but due to the limit of the listbox. So I switched to ListView. However I can't find anything similar to what I was using for ListBox. There are two API calls that I used for ListBox that I want to use for ListView. I found one of the two API calls. Does anyone know the API call for the other one?

First API call I want is to know how many items were selected.
ListBox uses
numSelected = SendMessage(lstAll.hWnd, LB_GETSELCOUNT, 0&, ByVal 0&)

And the ListView uses
numSelected = SendMessage(ListView1.hWnd, LVM_GETSELECTEDCOUNT, 0&, ByVal 0&)

Now to know which items were selected.
ListBox uses
'dim an array large enough to hold the indexes of the selected items
ReDim sSelected(1 To numSelected) As Long
'pass the array so Sendmessage can fill it with the selected item indexes
Call SendMessage(lstAll.hWnd, LB_GETSELITEMS, numSelected, sSelected(1))
All you have to do is loop thru the sSelected array. A time saver.

I like to find the same one for ListView instead of looping thru the whole listview and testing if the ListView1.SelectedItem = True. The reason I can't loop thru it everytime is due to the number of items. There are over 40,000+ items. The user will scroll down the list and select them as they go. They can either double-click on the selected items or click on the Add to List command button. There is another listbox that displays the selected items. One listbox shows all the items while the other shows the selected ones. We don't expect the user to select over 32,000 items. But they still need to view the 40,000+ items and select them. It will eventually one day go beyond 100,000 items. (But I won't be around for that. )

Anyone know the API call for ListView selected items?