Results 1 to 3 of 3

Thread: Userform - add new item to combobox drop down list
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Oct 2009
    Location
    New Jersey, US
    Posts
    138
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Userform - add new item to combobox drop down list

    I have a userform ComboBox that pulls drop down list from Col A of another sheet in workbook.

    This list in Col A is constantly added to manually. i.e. I have new clients to add.

    How can I avoid adding new clients manually in order to show up when using the userform ComboBox. What code can I add to the ComboBox to select an item in drop down list to add new client to Col A in other sheet. If I do not need to add new client I still want to see present list of clients in Col A in other sheet.

  2. #2
    Board Regular My Aswer Is This's Avatar
    Join Date
    Jul 2014
    Posts
    15,805
    Post Thanks / Like
    Mentioned
    28 Post(s)
    Tagged
    13 Thread(s)

    Default Re: Userform - add new item to combobox drop down list

    Please never use the term "Other Sheet" when asking for help

    Please give the name of the sheet.
    Please give the name of the ComboBox on your UserForm

    So are you saying you want to see all the values in Column A of sheet named "Alpha" in your ComboBox ?
    When your UserForm is opened.
    Be sure and always test this script on sample data the first time you use this as to avoid any problems with your data. Always trying to learn more and help others where I can. I'm using Excel 2013.
    Patience please Iím not perfect yet. "Memories are forever"

  3. #3
    Board Regular My Aswer Is This's Avatar
    Join Date
    Jul 2014
    Posts
    15,805
    Post Thanks / Like
    Mentioned
    28 Post(s)
    Tagged
    13 Thread(s)

    Default Re: Userform - add new item to combobox drop down list

    If the answer to my previous question is yes then add this script to your UserForm
    Code:
    Private Sub UserForm_Initialize()
    'Modified  7/16/2019  6:05:20 PM  EDT
    Dim Lastrow As Long
    Lastrow = Sheets("Alpha").Cells(Rows.Count, "A").End(xlUp).Row
    ComboBox1.List = Sheets("Alpha").Range("A1:A" & Lastrow).Value
    End Sub
    Be sure and always test this script on sample data the first time you use this as to avoid any problems with your data. Always trying to learn more and help others where I can. I'm using Excel 2013.
    Patience please Iím not perfect yet. "Memories are forever"

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •