Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Easy Listbox to Sheet?
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 -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Easy Listbox to Sheet?
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. -- Regards, Tom Ogilv -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Easy Listbox to Sheet?
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 ; -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform Listbox using an active sheet | Excel Discussion (Misc queries) | |||
Macro for sheet delete, very easy | Excel Discussion (Misc queries) | |||
Easy! How scroll down to end of big sheet | Excel Discussion (Misc queries) | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
Easy one: Remembering previous sheet name | Excel Programming |