PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

Bug ! Textbox on userform will not align text correctly ?

 
 
=?Utf-8?B?R3Jlbmllcg==?=
Guest
Posts: n/a
 
      8th Jan 2007
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 With Quote
 
 
 
 
Corey
Guest
Posts: n/a
 
      8th Jan 2007
You can align the text in a textbox or combobox through the properties:

TextAlignLeft
TextAlignCentre or
TextAlignRight

Change to suit

Corey...

"Grenier" <(E-Mail Removed)> wrote in message
news:7A6B5911-0627-41F7-8330-(E-Mail Removed)...
>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 With Quote
 
NickHK
Guest
Posts: n/a
 
      8th Jan 2007
You need to reset the txt_name.SelStart property to 0.

NickHK

"Grenier" <(E-Mail Removed)> wrote in message
news:7A6B5911-0627-41F7-8330-(E-Mail Removed)...
> 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 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
Cannot align text in a textbox vertically - Word 2007 bocaraton Microsoft Word Document Management 1 2nd Oct 2008 09:13 PM
Text-align in buttons userform Gert-Jan Microsoft Excel Programming 1 23rd Aug 2006 04:02 AM
highlight text in userform textbox RB Smissaert Microsoft Excel Programming 1 2nd Nov 2005 11:44 PM
Using The Text From A Textbox In A UserForm Donna Microsoft Excel Programming 2 24th Feb 2005 03:25 PM
formatting text in TextBox in UserForm =?Utf-8?B?S2V2aW4=?= Microsoft Excel Programming 2 7th Nov 2003 01:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:18 AM.