Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform Listbox using an active sheet [email protected] Excel Discussion (Misc queries) 0 March 1st 06 08:22 PM
Macro for sheet delete, very easy comotoman Excel Discussion (Misc queries) 1 October 11th 05 11:19 PM
Easy! How scroll down to end of big sheet dewsbury Excel Discussion (Misc queries) 2 July 11th 05 11:41 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
Easy one: Remembering previous sheet name paul Excel Programming 2 August 13th 03 04:04 PM


All times are GMT +1. The time now is 08:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"