Quote:
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
I didn't understand what your code is doing here... :)