+ Reply to Thread
Results 1 to 2 of 2

VBA Userform combo box - need to enable user to add new item if not listed in combo box

  1. #1
    Registered User
    Join Date
    09-07-2012
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    51

    VBA Userform combo box - need to enable user to add new item if not listed in combo box

    Hi there,

    Thank you for your time in advance.
    I am using Excel 2010 and have a 2 part question.

    1. I have a combo box on a multipage called "cmbx_Last_User_Name" which has a list of people. The user has to make a selection from the list, or if the name is not listed, the user needs to be able to enter it in the combo box.
    The new name should then be 'added' to the list, which is a Named Range ("LastUserName") which is contained in the worksheet code named "ws_Validation_List" (not the sheet name).

    2. Is it possible to have VBA hard code the named range to be sorted alphabetically from A-Z automatically or would I need 2 option controls, (1) A-Z (2) Z-A and have the user manually sort the list?

    I have searched all over the internet and haven't found anything similar, no matter how I word my search, so I don't know where to start from (which procedure would I have to put the code in, the Userform?).

    To summarise the names of the controls etc ...

    - Combo Box name = cmbx_Last_User_Name
    - Worksheet code name where the Named Range is located = ws_Validation_List
    - Named Range = LastUserName
    - Code name of data capture sheet = ws_Incident_Details

    I would be immensely grateful for any assistance.
    Kind regards,
    TheShyButterfly
    Last edited by theshybutterfly; 03-18-2015 at 08:33 AM. Reason: wanted to take out asterisks and replace with bold, looks less messy

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA Userform combo box - need to enable user to add new item if not listed in combo bo

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ 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. Populate Combo box 2 based on Selected item in Combo box 1
    By Vasu_XL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2014, 07:45 AM
  2. [SOLVED] Select matching item in userform combo box
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2014, 02:19 PM
  3. enable certain combo buttons based on user selected option buttons
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-20-2013, 06:43 AM
  4. combo box user form code for two combo boxes
    By robert.begley1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-01-2012, 02:25 PM
  5. Add range instead og item to combo in userform
    By Magnet in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2012, 05:54 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