Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default multicolumn Listbox and textalignment

John,

I don't believe it is possible to change the alignments of individual
columns of a listbox.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com


"John Holland" wrote in message
...
Would there be a way to independently assign textalignments to different
columns in a multicolumn Listbox on a Userform ? Thanks,
JH




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default multicolumn Listbox and textalignment

Would there be a way to independently assign textalignments to different
columns in a multicolumn Listbox on a Userform ? Thanks,
JH


  #3   Report Post  
Posted to microsoft.public.excel.programming
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default multicolumn Listbox and textalignment

thanks for your suggestion Stephen, i have not tried it yet, because in the
meantime i have been able to accomplish what i wanted by adjusting the
formatting of the input data. it required some trial and error, but finally
managed to have a currency align on the right in a Listbox, while the
original and all other columns are outlined on the left,
thanks again,
JH

"Stephen Bullen" wrote in message
...
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



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
multicolumn adress file. want to sort on last , first name bdcochran New Users to Excel 5 May 29th 09 06:47 PM
Transferring items between multicolumn listboxes [email protected] Excel Discussion (Misc queries) 2 September 28th 07 03:09 PM
listbox B conditional of input in Listbox A Kim K Excel Discussion (Misc queries) 1 October 31st 06 08:27 PM
Values in a MultiColumn Listbox Tom Ogilvy Excel Programming 5 September 5th 03 08:30 PM
Sorting ListBox results or transposing ListBox values to other cells for sorting Rob[_8_] Excel Programming 1 July 9th 03 04:35 AM


All times are GMT +1. The time now is 05:16 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"