Recently I've been working on a program in VB6 to read information from a flat file into a ListView and allow users to search it.
While working with the program with extremely large lists (40,000 items) the FindItem method will not allow me to set the starting index (CurrentIndex) higher than 32,768.
Here's a snippet of how I'm using it:
I want to be able to step through the list and find everywhere the account names occur quickly. Iterating through using a For-Loop takes WAY too long.Code:Dim CurrentIndex as Long
CurrentIndex=1
While CurrentIndex <= Logs.FTPLog.ListItems.Count
Set itmFound = Logs.FTPLog.FindItem(Accounts.List(Accounts.ListIndex), lvwSubItem, CurrentIndex, 0)
If itmFound Is Nothing Then
FoundItem = False
Else
CurrentIndex = Clng(itmFound.Index)
.
.
.
End If
CurrentIndex = CurrentIndex + 1
Wend
Does anyone, by any chance (please for the love of God), know how to work around this? I would be forever in your debt!
-Justin
