View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Stephen Bullen Stephen Bullen is offline
external usenet poster
 
Posts: 67
Default multicolumn Listbox and textalignment

Hi John,

i had that feeling. For an application in which i need to right align a
currency and in the same list have other columns align left, i need some
kind of tric. i tried formatting the column in the Excel-sheet itself in a
variety of ways, but i cannot get it as it should. I was thinking of having
the currency formats read into a textstring with a certain length and lead
them with enough blanks to have them aligned right as well. Do you think
that would work, or would i have a better chance by filling the Listbox
using an array in stead of using the Cellrange of a sheet ? Thanks for any
comments,


An alternative would be to use the common ListView control instead of the
built-in ListBox. It's a little harder to code against, but gives much more
functionality (including alignment of individual columns). You can add it by
right-clicking the control toolbox, choosing 'Additional controls' and
selecting the 'Microsoft List View control'.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk