
View One column of Multi Column Listbox
Hi Laura,
What's missing the ColumnWidth property setting. Whenever you load an array
into a listbox or combobox and the array has more dimensions (= columns) than
you want displayed, just set the widths of the corresponding columns to zero,
and size the width(s) of the other(s) to total the width of the box. So in
your case, if we assume your combobox is, say, 100 points wide, you'll want
its ColumnWidth string to say 100;0
(The ColumnWidth string always looks a little odd compared to other control
properties, and in my view could be better documented. The helpfile example,
in '97 at least, doesn't even show you a nice ordinary one....)
--
Reply ONLY to the newsgroup. Note: MVPs do not work for Microsoft.
MVP FAQ: http://www.mvps.org/word
Userform demystification: http://www.speakeasy.org/~mtangard/userforms.html
"Life is nothing if you're not obsessed." --John Waters
Quote:
> Hi,
> I have a list box that in a user form that actually has two columns, but I
> only want one column to be visible. I load the list into this list box from
> a two column table in another document.
> I only want the user to see data from the first column, but after they make
> selections from the list box, data from BOTH columns will be inserted into
> the document generated by the template containing the form.
> For the list box properties I tried setting the Bound Column, Column Count,
> and Text column all to 1, but I still see data from both columns when the
> form loads.
> How can I use both columns but limit the list box display to the first one?
> Many thanks!