View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
kirkm[_8_] kirkm[_8_] is offline
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"))