Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Aligning text in a box
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Question on aligning a cell itself, not the text | Excel Discussion (Misc queries) | |||
aligning text | Excel Worksheet Functions | |||
Aligning decimal numers to the centre of the cell and aligning dec | Excel Discussion (Misc queries) | |||
Aligning text | Excel Discussion (Misc queries) | |||
aligning entry in text box | Excel Programming |