+ Reply to Thread
Results 1 to 3 of 3

Extracting all values in a list box into excel

  1. #1
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Cape Town
    MS-Off Ver
    Excel 2010
    Posts
    107

    Extracting all values in a list box into excel

    Hi,

    I have a user form with a listbox. The user is able to add to this list box as many items as he wants. What I would like to do is be able to export from this list box into an excel worksheet. I would like to hardcode where the first value should be, say in cell A1, and the rest of the values should automatically populate A2, A3, A4 etc based on how many items there are in the list box.

    I've tried several methods to try do this. Problem is a lot of them require me to select a specific item in the list box and then it can only export that. I would like all the items to be exported. I found a snippet of code online I've modified but I cant get it to work. It only exports a single selected value.

    Any help would be appreciated

    HTML Code: 
    Last edited by concatch; 05-23-2013 at 12:24 PM.

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Extracting all values in a list box into excel

    Concatch, can you attach an example of your file for a better understanding of your problem

  3. #3
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Cape Town
    MS-Off Ver
    Excel 2010
    Posts
    107

    Re: Extracting all values in a list box into excel

    I just solved the issue. The above codes if statement required that you select each item in the list box and add it individually.

    This code will print all the values to excel

    HTML Code: 
    Thanks though

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1