Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextAlign in List Box
I have a multi column list box and it's row source assigned to a
worksheet. Three of the columns contain numbers which should be right aligned, and three text, to be left aligned. The TextAlign properties affects all columns. Is there any way to achieve this? I can get the Worksheet formatted perfectly but that's lost in the list box. Any help much appreciated Thanks - Kirk |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
TextAlign in List Box
I'm answering my own question! Just in case anyone's interested... or has an improvement. Set TextAlign to 3. This fixes the numbers For left alignment this works for me - Function fixedlength(theString) fixedlength = Left(theString & String$(10, 9), 10 + Len(theString)) End Function ActiveWorkbook.Worksheets("Sheet1"t).Range("A1").V alue = LTrim(fixedlength("12345")) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use VBA to reset data validation (=list) value to first value in that list (list is a named range) | Excel Programming | |||
Compare List A to List B, Return List B Items Not in List A | Excel Programming | |||
Userform TextBox TextAlign Problem-Bug? | Excel Programming | |||
TextAlign in Combo Boxes | Excel Discussion (Misc queries) | |||
Listbox textalign | Excel Programming |