If you're trying to capture the text entered, I do it this way.
First, dimension a global variable. For example: tbx1 for textbox 1.
Dim tbx1 As String
Then in the textbox area add a line:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
tbx1 = TextBox1.Text
You don't need:
txtGroup.SelectionStart = 0
txtGroup.SelectionLength = txtGroup.Text.Length
unless you need to capture a specific portion of the entry or limit the characters entered..
You then use the variable tbx1 if you want to write the entry to a file using a button click event
Dim myfile as test.txt
Dim sr As StreamWriter = File.CreateText(myfile)
Will write the contents of TextBox1 to a file named test.txt
Be advised if test.txt does not yet exist you will need to create it.
Microsoft MVP FrontPage
This site is best viewed............
.......................with a computer