Wrapping entries in a ListBox

L

Luke

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?
 
R

Rick Rothstein

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top