+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Combo or list box?

  1. #1
    Registered User
    Join Date
    03-16-2009
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    1

    Combo or list box?

    I'm wondering if anyone can help.

    I want to create a list box, or a combo box, however, my dillema is that my table has a multiple columns. I want to be able to see one of the columns from my table, and once the choice is made, I want a corresponding value from the other column to appear. How do I specify the column to be in the list box, and how to program it to show the value in the other column instead.
    Is there a way?
    Last edited by VBA Noob; 03-16-2009 at 01:29 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Combo or list box?

    Maybe a sample worksheet attached along with examples of inputs and desired outcomes would help us visualize your dilemma.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Combo or list box?

    ,

    If I understand you correctly you just want to see a specific set of values from one of the columns in a range that is used by the .RowSource property of the combobox.

    In which case you need to use the BoundColumn property of the list/combobox. If you want to see the 3rd column of your table, then set the BoundColumn to 3, and use the ColumnWidths property to hide the other columns. i.e. in the ColumnWidths property enter 0;0;25;0;0... etc for as many columns as there are in your table.

    Remember that you can reset the Bound Column in code which is useful when you want to see different values from your table in the same ComboBox. It saves duplicating ComboBoxes.

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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