I'd like to know how to add text to a textbox by the use of an event, for example the click of a button.
Now when I say add I literally mean add, not replace.
TextBox1.Text = ""
Use the concatenation operator to concatenate your new text with the old one:
TextBox1.Text &= "D" 'Results in "ABCD"
or use the
TextBox1.AppendText("D") 'Also results in "ABCD"
Note that my first example is the same as doing:
TextBox1.Text = TextBox1.Text & "D"
Also see this Stack Overflow answer about why you should always concatenate strings with the ampersand (
&) instead of the plus sign (