+ Reply to Thread
Results 1 to 7 of 7

Add (Number) in TextBox to populate ComboBox

  1. #1
    Registered User
    Join Date
    05-27-2016
    Location
    England
    MS-Off Ver
    2010
    Posts
    48

    Add (Number) in TextBox to populate ComboBox

    Hi,

    I have a Userform and would like to be able to put a number between 1-50 in a TextBox then click the "ADD" button and it add a prefix of AA to the number then display all the numbers in a ComboBox/drop down list.

    e.g. Put the number "10" into the text box then click a Button call "ADD" i then want to see "AA1" in the 1st line, "AA2" in the second line all the way to "AA10" in the ComboBox/drop down list

    Can this be done?

    TIA

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Add (Number) in TextBox to populate ComboBox

    See if this gets you close.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    05-27-2016
    Location
    England
    MS-Off Ver
    2010
    Posts
    48

    Re: Add (Number) in TextBox to populate ComboBox

    Hi Tinbendr,

    Sorry for the delay in my reply, Wow thank you very much this is perfect!

    Is there any way to stop it adding the same line over and over (e.g. if you type No.1 then the No.2 i get a repeat of number 1)

    TIA

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Add (Number) in TextBox to populate ComboBox

    Try this.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Registered User
    Join Date
    05-27-2016
    Location
    England
    MS-Off Ver
    2010
    Posts
    48

    Re: Add (Number) in TextBox to populate ComboBox

    Perfect, Thank you very much for your help.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Add (Number) in TextBox to populate ComboBox

    You're welcome.

  7. #7
    Registered User
    Join Date
    05-27-2016
    Location
    England
    MS-Off Ver
    2010
    Posts
    48

    Re: Add (Number) in TextBox to populate ComboBox

    Thank you very much

+ 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] Populate combobox with only items containing string in textbox
    By Tarena in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-15-2016, 11:09 AM
  2. [SOLVED] Auto populate textbox value based on combobox value
    By justin1202 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2015, 04:01 AM
  3. [SOLVED] Dynamic Independent ComboBox - Populate TextBox
    By Raylou in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2015, 04:28 AM
  4. Populate TextBox based off ComboBox selection
    By ladams41 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2014, 01:24 PM
  5. [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
  6. Populate textbox from a combobox (Solved)
    By age in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-02-2012, 07:14 AM
  7. Combobox populate textbox
    By samtwilliams in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-22-2007, 10:27 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