Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Text-align in buttons userform | Excel Programming | |||
How do you edit the text in a userform-textbox? | Excel Programming | |||
Using The Text From A Textbox In A UserForm | Excel Programming | |||
Qn: Display Text in TextBox in Userform | Excel Programming | |||
formatting text in TextBox in UserForm | Excel Programming |