+ Reply to Thread
Results 1 to 6 of 6

vba populating data by the user into a combo box

  1. #1
    Forum Contributor
    Join Date
    12-06-2021
    Location
    Fort Lauderdale, Florida. United States
    MS-Off Ver
    365
    Posts
    143

    vba populating data by the user into a combo box

    Hello!

    I am preparing a user form that is used to enter driver-delivery records for an uber delivery driver friend.

    One of his requests is to have a drop-down for "restaurant name" but right now the DataBase is blank. I am debating whether using a ComboBox is the right way to do this because you can't add new entries from a ComboBox.

    Which would be the correct method to use when entering a Restaurant Name and have it be available for choosing it again later? My main goal is to have this self running rather than having him call me every day to add new restaurant names every time he makes a new delivery.

    A TextBox comes to mind, but you don't have a drop-down option from that.

    I have all the other entry points figured out but this is a road block for me.

    Thanks in advance with any insight!!

    Rob.

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,027

    Re: vba populating data by the user into a combo box

    because you can't add new entries from a ComboBox
    Yes you can...Upload a sample file of your current setup...
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    12-06-2021
    Location
    Fort Lauderdale, Florida. United States
    MS-Off Ver
    365
    Posts
    143

    Re: vba populating data by the user into a combo box

    Thanks buddy! as to HOW to do it is my roadblock. I'm googled-out. lol. The search algorithms seem to think that I am asking how to populate a ComboBox. That, i know how to do. I just need to find a method that allows me to add new data as it comes in.

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,027

    Re: vba populating data by the user into a combo box

    As per post2
    Upload a sample file of your current setup...

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,225

    Re: vba populating data by the user into a combo box

    Create Dynamic named range "Restaurants"

    Refers to:

    =OFFSET(Sheet1!$A$2,,,COUNTIF(Sheet1!$A$2:$A$100"<>"),1)

    so data in A2 down

    In "Combobox1" (for example) properties set Rowsource to "Restaurants" (without quotes)

    You can add/delete from named range at will.

    SINTEK is a VBA expert (much better than myself) so he probably has a better way
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,027

    Re: vba populating data by the user into a combo box

    SINTEK is a VBA expert (much better than myself) so he probably has a better way
    Just learning one day, one problem at a time John

    Have no idea what your Filer Setup is...This will give you an idea...
    Opens with Empty database...
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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] Populating a User Form Combo Box
    By Mike Savage in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2020, 05:37 AM
  2. [SOLVED] Populating data based on Combo Box Selection
    By blake8705 in forum Excel General
    Replies: 2
    Last Post: 11-14-2017, 10:05 AM
  3. [SOLVED] Populating any combo box on any user form through passed parameters
    By insomniac53 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-28-2015, 03:59 AM
  4. populating list boxes and combo boxes in a user form.
    By ahceinaej in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-10-2014, 11:54 AM
  5. User Form with with Populating Combo Boxes
    By Maneesh Massey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2013, 04:46 AM
  6. Error when populating cell with “Time” from combo box in user form
    By jwala in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2010, 09:01 AM
  7. Populating a list box or combo box on a User Form
    By matpj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2006, 08:28 AM

Tags for this Thread

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