How scroll to end of text in a text box?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text box containing the contents of a memo column.
How do I get the display to position to the last line of text in the box?
It always opens positioned at the top.

Also, if I click on some command button outside the text box I lose my
position in the text, I'd like to be able to save the position and later
return to it. Is this possible?

Thanks.
 
Yes, check out the following functions in the Help file:

SelStart and SelLength properties of a textbox.
Len() function.

To set the cursor or get the current cursor position, use the SelStart
property. Using SelLength also will highlight the number of characters
listed in SelLength. The Len() function will tell you how many characters
are in the textbox, so if you set SelStart to Len(Me.txtMyTextbox) you will
place the cursor at the end of the text in the textbox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top