Easy Listbox to Sheet?

N

Noggin

Hi M8's

Can any on guide me as to the easy way to copy the contents of a mult
column list box to a worksheet, the column & row methord look
painfully slow. Is there an easy way? Sorry if this seams to be a bi
lame.
Also how on earth do you populate the headings in a listbox afte
turning them on?

Thankx for any 11111 help:rolleyes
 
T

Tom Ogilvy

Dim varr as Variant

varr = me.Combobox1.List

numRows = Ubound(varr,1)-lbound(varr,1)+1
numColumns = Ubound(varr,2)-lbound(varr,2)+1

With Worksheets("Sheet9")
.Range("B9").Resize(numrows,NumColumns) = varr

End With


-----------

The columnheading can only be set by using the rowsource (userform) o
listfillrange (worksheet) Property to populate the list. If so, the
the row above the specified range is used to populate the colum
headings. If the rowsource/listfillrange starts in row1, then it use
the column letters.

You can't populate them if you don't bind the control list to th
sheet.
 
N

Noggin

Thankx Tom,

Easy when you know how, just changed the combobox for listbox an
deimed the vars numrows, numcolumns all fine. First class!

I tried unsucessfully to get the headings in, obviously I need a bi
more pointing in the right direction. Woul;d you oblige please. Pehap
some other kind sole might enlighten me.

Thankx for the help ;
 
Top