Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force scroll down in a text box 1

Status
Not open for further replies.

crrrazydan

Programmer
Jul 27, 2000
34
US
I am using the following code to update a textbox that has a vertical scroll bar:

text1.text = text1.text & newinfo & vbNewLine

The problem is whenever the textbox is updated, it scrolls all the way up, making you have to scroll down to see what was just put into the text box. So, is there a way to make it scroll down with the text1.changed event, or a better way to write the above code so it won't scroll up? By the way, I don't want to use SendKeys because it has to work even the textbox and form are out of focus.
 
Set the SelStart property of the text box to Len(txtTheBox.Text). That puts the insertion point at the end of the text. If I'm not mistaken, the box will automatically scroll to make the insertion point visible. Rick Sprague
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top