Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
format listbox columns | Excel Programming | |||
Alignment and format in listbox columns | Excel Programming | |||
Alignment and format in listbox columns | Excel Programming | |||
Q: find range, listbox - format and fit columns | Excel Programming | |||
Format columns in a ListBox? | Excel Programming |