+ Reply to Thread
Results 1 to 3 of 3

Populate Combobox With An If Statement?

  1. #1
    Registered User
    Join Date
    04-05-2016
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    40

    Populate Combobox With An If Statement?

    In the attached workbook, I have come up with a condensed version of something I am working on in a larger project. Essentially, there is one table "Orders" on Sheet1, and there is one userform. On the userform - OrderID will be a set field - in this example I have it set to a value of 100. I would like the Product combobox to populate with options which relate only to OrderID 100 in the Orders table - nails and screws.

    The ultimate idea is that whatever OrderID is entered, will "filter" the combobox dropdown to only products relating to that OrderID.

    I don't know if maybe an If statement is what I need to make this work?

    If anyone is able to help I would greatly appreciate the time and effort

    Best!
    Attached Files Attached Files

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Populate Combobox With An If Statement?

    If the value of the orderID textbox is static then:

    Please Login or Register  to view this content.
    If the user will be changing the orderID value, then you might be better off putting it in the afterupdate event for the orderID textbox.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    04-05-2016
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    40

    Re: Populate Combobox With An If Statement?

    Thanks Arkadi - works perfectly!

+ 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] ComboBox to populate Listbox and 2nd Combobox based on 1st combobox dropdown choice
    By bbqqsmokeman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2017, 08:21 PM
  2. [SOLVED] Userform ComboBox to dinamically populate results basis of another combobox
    By rlh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-05-2017, 06:27 PM
  3. [SOLVED] Code required to Auto Populate 3rd Combobox based on 02nd Combobox Selection
    By bimmy80 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-14-2015, 03:56 AM
  4. [SOLVED] How do I populate a specific range in one ComboBox based of selection of another ComboBox?
    By gmr4evr1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-04-2015, 04:32 PM
  5. Userform Combobox to populate form: Can I change the order of the columns in the combobox?
    By CraigWiggins in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-31-2014, 12:14 PM
  6. [SOLVED] Excel Userform: Populate other controls (i.e. textbox & combobox) based on combobox select
    By MileHigh_PhD in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 04:50 PM
  7. Replies: 2
    Last Post: 09-14-2009, 08:34 AM

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