Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Bug ! Textbox on userform will not align text correctly ?

I have several textbox control on a userform. Some are on the form and others
are on a multipage control. They are all set to align text to the left.

When the number of char exeed the width of the textbox (text too long to fit
in the textbox), the alignment become now to the right ! Even when the
userform loads for the first time.

Further more when I put focus on the multipage (click on a textbox on the
multipage) every textbox that have text too long to fit in the textbox change
automatically it's align property to the right.

Text is store on a sheet and is push back on the controls in the
UserForm_Initialize event like so: txt_name.Value = Cells(3, 2)

Anybody have seen this behavior or am I missing a property ??

Merci !
Jean-Francois Grenier.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default Bug ! Textbox on userform will not align text correctly ?

You can align the text in a textbox or combobox through the properties:

TextAlignLeft
TextAlignCentre or
TextAlignRight

Change to suit

Corey...

"Grenier" wrote in message
...
I have several textbox control on a userform. Some are on the form and
others
are on a multipage control. They are all set to align text to the left.

When the number of char exeed the width of the textbox (text too long to
fit
in the textbox), the alignment become now to the right ! Even when the
userform loads for the first time.

Further more when I put focus on the multipage (click on a textbox on the
multipage) every textbox that have text too long to fit in the textbox
change
automatically it's align property to the right.

Text is store on a sheet and is push back on the controls in the
UserForm_Initialize event like so: txt_name.Value = Cells(3, 2)

Anybody have seen this behavior or am I missing a property ??

Merci !
Jean-Francois Grenier.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Bug ! Textbox on userform will not align text correctly ?

You need to reset the txt_name.SelStart property to 0.

NickHK

"Grenier" wrote in message
...
I have several textbox control on a userform. Some are on the form and

others
are on a multipage control. They are all set to align text to the left.

When the number of char exeed the width of the textbox (text too long to

fit
in the textbox), the alignment become now to the right ! Even when the
userform loads for the first time.

Further more when I put focus on the multipage (click on a textbox on the
multipage) every textbox that have text too long to fit in the textbox

change
automatically it's align property to the right.

Text is store on a sheet and is push back on the controls in the
UserForm_Initialize event like so: txt_name.Value = Cells(3, 2)

Anybody have seen this behavior or am I missing a property ??

Merci !
Jean-Francois Grenier.



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
Text-align in buttons userform Gert-Jan Excel Programming 1 August 23rd 06 04:02 AM
How do you edit the text in a userform-textbox? John Keith[_2_] Excel Programming 0 February 23rd 06 03:40 PM
Using The Text From A Textbox In A UserForm Donna[_7_] Excel Programming 2 February 24th 05 03:25 PM
Qn: Display Text in TextBox in Userform Michael Vaughan Excel Programming 1 August 18th 04 05:06 PM
formatting text in TextBox in UserForm Kevin Excel Programming 2 November 7th 03 01:34 PM


All times are GMT +1. The time now is 04:14 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"