devxlogo

The fastest way to append contents to a TextBox control

The fastest way to append contents to a TextBox control

The most intuitive way to append a string to the current contents of a TextBox is through the & string operator, as in:

Text1.Text = Text1.Text & "more text"

However, you can reach the same result about 4 times faster with the following method:

Text1.SelStart = Len(Text1.Text)Text1.SelText = "more text"

devx-admin

Share the Post: