Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default 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
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
Use VBA to reset data validation (=list) value to first value in that list (list is a named range) ker_01 Excel Programming 7 October 27th 08 03:13 PM
Compare List A to List B, Return List B Items Not in List A zwestbrook Excel Programming 4 September 18th 08 10:32 PM
Userform TextBox TextAlign Problem-Bug? Jason Moser Excel Programming 0 July 10th 06 01:25 PM
TextAlign in Combo Boxes Barry Jive Excel Discussion (Misc queries) 2 June 25th 05 04:52 PM
Listbox textalign R4gtl Excel Programming 1 January 26th 05 08:32 PM


All times are GMT +1. The time now is 04:01 PM.

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"