Imports System

Public Class Test
	Public Shared Sub Main()
		

 
 
	End Sub

         Private Sub txtInput_KeyPress(KeyCode As Integer)
If KeyCode = 13 Then 
YourVariable = txtInput.Text
End If
End Sub
End Class