multi-column listbox on userform, multiple issues

K

KR

Using Excel2003 on Windows2000;

I'm trying to incorporate a multi-column listbox on a userform and can't
figure out how to get the behavior I'd like (if it is even possible).

(1) In the VBE, I got my rowsource and column headers (6 columns, source is
sheet4, cells A2:F10) so that I could see my data in the VBE (on the listbox
on my userform). When I actually showed my userform in run mode, the listbox
was blank and when I re-entered the VBE, my listbox was back to being blank.
I'm using columnheads=true, boundcolumn=1, columncount=6, rowsource = A2:F10
[note: I tried Sheet4!A2:F10 but it didn't like the sheet reference, then
actually showed my data when I just left the cell reference- not sure why,
but I suspect that is part of my problem].

Is there a simple way in the listbox properties to assign a fixed range of
cells to populate it? If not, what is the easiest way (least code) to
populate my listbox from my range?

(2) During the short period of time that I had my range showing in the VBE,
I noticed that those ranges contains more data in some source cells than the
listbox will show, and I can't find a wordwrap option for the listbox. Best
case scenario, I'd like to have it determine total row height based on
wordwrap in the 4th column, which has the longer text. The other columns
have less critical information, so I really don't need to see the extra info
in those other columns- just whatever would show in the same space as would
be needed by column 4.

Is there a wordwrap property hidden somewhere for multi-column listboxes, or
am I out of luck?

Thanks in advance,
Keith
 
T

Tom Ogilvy

Sheet4!A2:F10
should work fine and is the recommended way you should define the RowSource.

There is no wraptext or wordwrap option for entries in the list.
 
K

KR

Ah... I'm so used to referencing my sheets by their sheetname (name) instead
of the name that users can change, I was using Sheet4!A2:F10 when I should
have been using the 'common' name, e.g. SourceData!A2:F10. Works like a
charm now.
Thanks Tom!

Tom Ogilvy said:
Sheet4!A2:F10
should work fine and is the recommended way you should define the RowSource.

There is no wraptext or wordwrap option for entries in the list.

--
Regards,
Tom Ogilvy


KR said:
Using Excel2003 on Windows2000;

I'm trying to incorporate a multi-column listbox on a userform and can't
figure out how to get the behavior I'd like (if it is even possible).

(1) In the VBE, I got my rowsource and column headers (6 columns, source is
sheet4, cells A2:F10) so that I could see my data in the VBE (on the listbox
on my userform). When I actually showed my userform in run mode, the listbox
was blank and when I re-entered the VBE, my listbox was back to being blank.
I'm using columnheads=true, boundcolumn=1, columncount=6, rowsource = A2:F10
[note: I tried Sheet4!A2:F10 but it didn't like the sheet reference, then
actually showed my data when I just left the cell reference- not sure why,
but I suspect that is part of my problem].

Is there a simple way in the listbox properties to assign a fixed range of
cells to populate it? If not, what is the easiest way (least code) to
populate my listbox from my range?

(2) During the short period of time that I had my range showing in the VBE,
I noticed that those ranges contains more data in some source cells than the
listbox will show, and I can't find a wordwrap option for the listbox. Best
case scenario, I'd like to have it determine total row height based on
wordwrap in the 4th column, which has the longer text. The other columns
have less critical information, so I really don't need to see the extra info
in those other columns- just whatever would show in the same space as would
be needed by column 4.

Is there a wordwrap property hidden somewhere for multi-column
listboxes,
or
am I out of luck?

Thanks in advance,
Keith
 

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