|
-
Mar 8th, 2009, 03:47 AM
#1
Thread Starter
New Member
[RESOLVED] [2008] User input data from textbox into an array
I'm trying to make a program where user can input data from a textbox into an array and when the user hit the enter key, it compare it to a data grab from a text file. Here is my code so far:
Private Sub TextBox_KeyDown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox.TextChanged
Dim input As String
Dim KeyCode As Integer
input = CStr(TextBox.Text)
If KeyCode = 13 Then
If InStr(1, varia3, input, vbTextCompare) <> 0 Then golden = True
If golden = True Then msgbox("match")
If golden = False Then msgbox("mismatch")
End If
End Sub
I got the part where the program can graph data from text file and put it into an array called "varia3". The part I could not get is allowing user to enter data into the textbox. When I run the program, the sec I try to enter a letter or number into the textbox the program ended.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|