Populate Worksheet from ListBoxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to transfer the contents of several listboxes to a temporary
worksheet for the purpose of printing a report. I suppose I could loop
through the contents of the listbox, but isn't there a way to get all of it
at once?

My current thinking (which may be all wet) is to transfer the contents to an
array then from the array to the worksheet.

Thank you
 
Clay,

Is the listbox from the Forms command bar or the Controls command bar, or is
it on a user form? Are you using the ListFillRange property?

You might try something like

Dim V As Variant
V = Sheet1.ListBox1.List
Range("C11").Resize(UBound(V) - LBound(V) + 1).Value = V


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top