From: Luke on
I have a macro that takes cell data from a spreadsheet and populates a
ListBox. I have no problems getting the data I want into the ListBox, but
I'd like to make it look neater. Many of the items I add are longer than the
width of the ListBox. I'd like to wrap (and possibly indent?) such entries,
but I can't find a WordWrap property for the ListBox in the Properties
window. Does anyone know a way to do this?
From: Rick Rothstein on
To the best of my knowledge, you cannot have multiline items in a ListBox
(without horizontal "grid" lines, I think it would be complicated to read).
However, assuming you are using an ActiveX control and not one from the
Forms toolbar, you can implement a horizontal scroll bar so the that the
long items can be read in their entirely... just set a ColumnWidths property
to a number of points large enough to allow the scroll bar to reveal all of
the text (you can do that by trial and error).

--
Rick (MVP - Excel)



"Luke" <Luke(a)discussions.microsoft.com> wrote in message
news:CA2B6356-84E1-4C9D-B96A-16637EF1B7C9(a)microsoft.com...
> I have a macro that takes cell data from a spreadsheet and populates a
> ListBox. I have no problems getting the data I want into the ListBox, but
> I'd like to make it look neater. Many of the items I add are longer than
> the
> width of the ListBox. I'd like to wrap (and possibly indent?) such
> entries,
> but I can't find a WordWrap property for the ListBox in the Properties
> window. Does anyone know a way to do this?