+ Reply to Thread
Results 1 to 4 of 4

Populate multicolumn listbox

  1. #1
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Kiruna
    Posts
    163

    Populate multicolumn listbox

    Hi

    i use this code to populate a list box from worksheet "Data"

    The problem i have is that i want to populate both column A and B to the listbox and
    with this code i only get it to populate from column A, can anyone help me with what
    i have to add to make it populate both columns in the the listbox ?


    Please Login or Register  to view this content.
    Right now i using this code and i works, exept it populates the active sheet i have open in excel i want to have another sheet open when i open the userform.
    Please Login or Register  to view this content.
    Petter
    Last edited by Petter120; 11-15-2014 at 07:53 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Populate multicolumn listbox

    Those 2 code do different things. The first will skip empty cells between row 1 and the end row. The second uses all cells between row 1 and end row.

    2 columns

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Kiruna
    Posts
    163

    Re: Populate multicolumn listbox

    Ok but it seems to work fine now

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Populate multicolumn listbox

    You will notice I added the . (period) before the Range property as you use the With command.

    Without the period the range would reference the active sheet rather than the sheet specified in the With

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Need to populate a multicolumn listbox using the value of a combo box
    By wingnut74 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2014, 03:19 PM
  2. Multicolumn dynamic Listbox - Remove Duplicates in Listbox
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2014, 12:30 PM
  3. Having problems populating a multicolumn listbox changing Listbox column with a loop.
    By Aristizabal95 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2013, 12:41 PM
  4. Copy Selected items from multicolumn, multiselect listbox to another listbox
    By Willigb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-19-2013, 11:27 AM
  5. [SOLVED] populate multicolumn listbox?
    By Alen32 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-22-2005, 06:06 PM

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