Good day !

I would like to ask, if I have a list of numeric datas, let say list of student IDs in a text file like this.

Example:

1991123115
1001155448
1236666554
1231311111
4894546122

Then I plan to have a form with a text field for the user to input their ID. After clicking OK button, how i going to write codes so that my program will compare the ID input by the user with those in the lists.

I try to use Input command but fail.

Do I miss out something here ? Below is the code that I write.

Static UserID(1500) As String
Dim CheckResult As Boolean
Dim Counter As Integer
Dim Control As Integer

Counter = 1
Open "C:\CLS\Members.bch" For Input As #1
Input #1, UserID(Counter)

Do Until (EOF(1) = True)
Counter = Counter + 1
Input #1, UserID(Counter)
Loop

Counter = Counter - 1

For Control = 1 To Counter
If UserID(Counter) = TxtID.Text Then
CheckResult = True
Else
CheckResult = False
End If
Next Control

Close #1

I need help here in urgent. Thanks a lot !