The script searches for strings inside of another string.

My problem is that List3 loads +400 items and then when it searches it will freeze up the program.

I put a limit on it to only load 20 items so it dose not freeze up.

But it dose not get close to finishing what it needs to do.

Code:
Private Sub Command1_Click()
Const StringLen = 20
Dim MyArr(StringLen), TxtString As String

List3.Clear
List4.Clear
Randomize
' Generate random string and list of numbers
For i = 1 To StringLen
    TxtString = Text1.Text
    Call loadlist
Next
' Search List
For i = 1 To StringLen
    If InStr(TxtString, List3.List(i - 1)) Then
        List5.AddItem List3.List(i - 1) & " found!"
    Else: List4.AddItem List3.List(i - 1) & " not found."
    End If
Next
    
End Sub

'Populates the listbox
Private Sub loadlist()

Dim strTemp As String
Open App.Path & "\Item2.txt" For Input As #1
Do Until EOF(1) = True
Line Input #1, strTemp
List3.AddItem strTemp
Loop
Close #1

End Sub