Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default Listbox Auto Column Width

Hi All

Is it possible to 'autofit' column widths in a ListBox built from the
Control Toolbox?
If so, can you point me in the right direction.

Thanks

Trevor Williams
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Listbox Auto Column Width

This from the VBA help file:

To separate column entries, use semicolons (;) as list separators. In
Windows, use the list separator specified in the Regional Settings section
of the Windows Control Panel to change this value.

Any or all of the ColumnWidths property settings can be blank. You create a
blank setting by typing a list separator without a preceding value.

If you specify a -1 in the property page, the displayed value in the
property page is a blank.

To calculate column widths when ColumnWidths is blank or -1, the width of
the control is divided equally among all columns of the list. If the sum of
the specified column widths exceeds the width of the control, the list is
left-aligned within the control and one or more of the rightmost columns are
not displayed. Users can scroll the list using the horizontal scroll bar to
display the rightmost columns.

The minimum calculated column width is 72 points (1 inch). To produce
columns narrower than this, you must specify the width explicitly.




"Trevor Williams" wrote in
message ...
Hi All

Is it possible to 'autofit' column widths in a ListBox built from the
Control Toolbox?
If so, can you point me in the right direction.

Thanks

Trevor Williams



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
Excel XML Auto Column Width Jerry_Jcgf Excel Programming 0 May 22nd 09 08:41 AM
Auto Column width for new sheets in workbook? J.W. Aldridge Excel Programming 2 September 1st 06 12:48 AM
Listbox Column Count and Width Dont work. Seems Easy Brandon Johnson Excel Programming 7 June 7th 06 06:07 PM
auto fit column width and row height kb Excel Discussion (Misc queries) 0 May 22nd 06 07:54 PM
Auto Adjust the Width of a Column reddog9069[_4_] Excel Programming 1 June 21st 05 05:10 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"