PC Review


Reply
Thread Tools Rate Thread

Aligning text in a box

 
 
Hank Youngerman
Guest
Posts: n/a
 
      20th Nov 2006
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      20th Nov 2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ppt: wrap around text aligning under bullet, not text Lucy G Microsoft Powerpoint 1 21st Nov 2008 05:57 PM
RE: ppt: wrap around text aligning under bullet, not text John Wilson Microsoft Powerpoint 0 21st Nov 2008 05:40 PM
Aligning Text and Graphic in a Text Box (Word 2007) GreenBoy Microsoft Word New Users 3 29th Aug 2008 07:18 PM
Aligning Text =?Utf-8?B?Um9iZXJ0IFQ=?= Microsoft Access Forms 13 29th Jun 2006 07:55 AM
Aligning text =?Utf-8?B?Sm9l?= Microsoft ASP .NET 2 25th Jan 2006 07:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:45 AM.