Erm, Im quite new with using Visual basic and I need help with this 1 code I just started.

What I am trying to do is have a field which I can type in and when I press the button it says what I have just typed in. Here is the code.

Code:
Public Class Form1


    Dim name As String

    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtbox.TextChanged


        name = txtname.Text

        MsgBox(name)


    End Sub
End Class
Thanks.