Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default How to format ListBox columns

How can I format a Listbox column containing numbers to include
2 decimal points including zeros and thousands separators-
eg the source data is formatted to read 1,234.20 but
this is reproduced in the ListBox column as 1234.2 and
1,234.00 as just 1234
Also , how can I set the width of a column containing text
to fit the widest entry.
Any help would be appreciated.
donwb


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 268
Default How to format ListBox columns

Select the list cell, click on Format Cells, Number, tick Use Thousands
seperator, and allow 2 decimals.

To fir for widest entry, move cursor to the column heading. If you want to
eg adjust column G, move your cursor to the line between G and H. It will
change shape to a vertical line with horizontal arrows. Double click and
you're done.

"donwb" wrote:

How can I format a Listbox column containing numbers to include
2 decimal points including zeros and thousands separators-
eg the source data is formatted to read 1,234.20 but
this is reproduced in the ListBox column as 1234.2 and
1,234.00 as just 1234
Also , how can I set the width of a column containing text
to fit the widest entry.
Any help would be appreciated.
donwb



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default How to format ListBox columns

Hi Kassie,
Thanks for your reply.
Perhaps I wasn't very clear in my question,
but the column I'm referring to is a column in a ListBox,
so the formatting needs to be done via VBA code,
or via the settings for the ListBox.
Also the same applies to the ListBox column width
fitting the widest entry.
donwb


"Kassie" wrote in message
...
Select the list cell, click on Format Cells, Number, tick Use Thousands
seperator, and allow 2 decimals.

To fir for widest entry, move cursor to the column heading. If you want
to
eg adjust column G, move your cursor to the line between G and H. It will
change shape to a vertical line with horizontal arrows. Double click and
you're done.

"donwb" wrote:

How can I format a Listbox column containing numbers to include
2 decimal points including zeros and thousands separators-
eg the source data is formatted to read 1,234.20 but
this is reproduced in the ListBox column as 1234.2 and
1,234.00 as just 1234
Also , how can I set the width of a column containing text
to fit the widest entry.
Any help would be appreciated.
donwb





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 515
Default How to format ListBox columns

Sorry, my mistake! Normally I set list box properties in the VBA properties
window. It is my experience that if the source list is formatted a specific
way, that the listbox adopts this formatting. Column widths are also set in
the properties window. There is an option Column widths, which accept
measurements in points. Enter your desired column widths here, seperated by
a ;. I do not know how to set it at runtime though.

--

HTH

Kassie

Replace xxx with hotmail


"donwb" wrote:

Hi Kassie,
Thanks for your reply.
Perhaps I wasn't very clear in my question,
but the column I'm referring to is a column in a ListBox,
so the formatting needs to be done via VBA code,
or via the settings for the ListBox.
Also the same applies to the ListBox column width
fitting the widest entry.
donwb


"Kassie" wrote in message
...
Select the list cell, click on Format Cells, Number, tick Use Thousands
seperator, and allow 2 decimals.

To fir for widest entry, move cursor to the column heading. If you want
to
eg adjust column G, move your cursor to the line between G and H. It will
change shape to a vertical line with horizontal arrows. Double click and
you're done.

"donwb" wrote:

How can I format a Listbox column containing numbers to include
2 decimal points including zeros and thousands separators-
eg the source data is formatted to read 1,234.20 but
this is reproduced in the ListBox column as 1234.2 and
1,234.00 as just 1234
Also , how can I set the width of a column containing text
to fit the widest entry.
Any help would be appreciated.
donwb






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
format listbox columns ranswrt Excel Programming 1 April 28th 08 03:39 PM
Alignment and format in listbox columns Jim Rech Excel Programming 4 August 25th 05 12:54 PM
Alignment and format in listbox columns Tom Ogilvy Excel Programming 0 August 24th 05 01:05 PM
Q: find range, listbox - format and fit columns Mark[_17_] Excel Programming 0 June 8th 04 12:41 PM
Format columns in a ListBox? Soniya Excel Programming 1 October 12th 03 11:40 AM


All times are GMT +1. The time now is 08:52 AM.

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"