Code:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If Not InStr(TextBox1.Text, Chr(13)) = 0 Then MsgBox("Enter Key was sent to text box")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = "hello" & Chr(13)
End Sub
If this helps you please use the thanks button.