Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on aligning a cell itself, not the text Susan Excel Discussion (Misc queries) 4 September 24th 08 02:32 PM
aligning text A Excel Worksheet Functions 4 August 22nd 07 03:25 PM
Aligning decimal numers to the centre of the cell and aligning dec Ramesh Babu Excel Discussion (Misc queries) 1 July 1st 06 10:33 PM
Aligning text Louise Excel Discussion (Misc queries) 1 March 16th 05 11:49 AM
aligning entry in text box Candee[_14_] Excel Programming 2 December 16th 03 05:03 PM


All times are GMT +1. The time now is 03:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"