How scroll to end of text in a text box?

M

mscertified

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.
 
W

Wayne Morgan

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.
 
Top