Aligning text in a box
Put this in the activate event
TextBox1.SelStart = 0
--
HTH
Bob Phillips
(replace xxxx in the email address with gmail if mailing direct)
"Hank Youngerman" wrote in message
oups.com...
I have a text box that contains instructions on running a program. The
length is larger than I want the userform and textbox to be, so it has
vertical scroll bars. However, when I open it, the text appears from
the bottom up. That is, if only 50% is visible at a time, it shows the
last 50%, and I would like it to show the first 50%.
My code is:
Private Sub ShowInstructions()
Load UserForm1
UserForm1.Textbox.Text = "These are the instructions. In reality they
are many paragraphs long."
UserForm1.show
End Sub
The textbox does have vertical scroll bars, and it is handling line
breaks just fine. It's just the initial positioning of the visible
text that is bad.
|