View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
joe joe is offline
external usenet poster
 
Posts: 62
Default populating a multi-column Listbox

Thank

----- Bob Phillips wrote: ----

Joe

Here is one way to load it. I have done it from an array, but you should b
able to adapt to your collectio

Dim ary, i,

ary = [{"Bob","M", 123;"Lynne","F",898;"Amy","F",543}

With ListBox
For i = 1 To
.AddItem ary(i, 1
For j = 2 To
.List(.ListCount - 1, j - 1) = ary(i, j
Next
Next
End Wit


--

HT

Bob Phillip
... looking out across Poole Harbour to the Purbeck
(remove nothere from the email address if mailing direct

"Joe" wrote in messag
..
Tom
What if I forget about the headers and want to populate a multicolum

listbox. Can I do this with VBA
I have VBA code in which I want to populate a multicolumn listbox wit

values that are stored in a collection; they are not located (now) in
worksheet range
Thanks
Jo
----- Tom Ogilvy wrote: ----
You have use the rowsource (userform) or listfillrange (worksheet

propert
of the Combobox. Then, when you make headers true in the properties

i
uses the row above the specified range to get the header information

Yo
can't do it unless you bind the control to a range using one of th

above
--

Regards
Tom Ogilv
"Joe" wrote in messag

..
Hello All
I am using Excel 2002 and am having trouble populating a 3 colum

listbo
with headers. Could someone provide a sample of code that I coul

mode
this by? The Xl help isn't that helpful with setting column header

an
populating the columns. Do I have to use a multi-dimensional array
Thanks
Jo