PDA

View Full Version : Multiple Column Listbox help



MarkNumskull
11-30-2009, 06:42 AM
Hi everyone,I am having real problems getting a listbox with 19 columns to populate, to be honest i cant even get the second column to populate, and it is driving me slightly mad!What i am using it for is to show search results from a huge list within the spreadsheet itself.Currently i am using 19 listboxes all stuck together, obv this isnt good enough. I have shown the code i use at the minute to populate these listboxes, is there anyway to convert this code to poulate 19 columns in a list box instead. I fear it may need an array :S

Bob Phillips
11-30-2009, 08:17 AM
If you want to populate moire than 10 columns in a listbox, you will have to bind the data to the listbox.

MarkNumskull
11-30-2009, 08:33 AM
Hi XLD,

Thanks for the reply, how would i bind the data to the list box, is that done from the row source property of the listbox?

Bob Phillips
11-30-2009, 09:14 AM
Yes that is it.

MarkNumskull
11-30-2009, 09:28 AM
only thing is because the listbox will be showing results that vary i cannot put in the rowsource a definate range of cells if that makes sense. The way it works is people will run a search for all post received on a certain day for example and the listbox is required to show the relevant results, would this still work?

Bob Phillips
11-30-2009, 09:39 AM
Then if you want all 19 columns you will have to do some work.

Instead of loading all of the found rows directly into the listbox, you will need to save them into a worksheet, anjd then bind the listbox to that range.

MarkNumskull
12-01-2009, 03:13 AM
Yeah thats what i was thinking i would have to do, its a bit longer but i could just create a named range and then populate that from the search.

Thanks for the help!