+ Reply to Thread
Results 1 to 10 of 10

Userform Command Button to add more comboboxes and textboxes at the same time

  1. #1
    Registered User
    Join Date
    05-20-2014
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    21

    Userform Command Button to add more comboboxes and textboxes at the same time

    I have a userform for customers to select the items that they want to buy. However, I have only put out 5 comboboxes for them to select the product and 5 textboxes that shows the price of the product. If they are purchasing more items, I would like to have a command button named "Add more items" and it will load 5 more comboboxes and textboxes at the same time, is it possible? And if they are buying even more, the button will help to generate more comboboxes and textboxes again.

    Please help!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform Command Button to add more comboboxes and textboxes at the same time

    Why not stick with the existing controls add and a listbox?


    Then insted of using the command button to add new controls it could be used to add the data from them to the listbox and them clear them ready for the user to select the next product.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    05-20-2014
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    21

    Re: Userform Command Button to add more comboboxes and textboxes at the same time

    Hi,

    Sorry but i dont quite get what you meant :/

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform Command Button to add more comboboxes and textboxes at the same time

    Actually after re-reading your post I think you could get away with only one textbox, one combobox, one command button and a listbox.

    See the attached file.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-20-2014
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    21

    Re: Userform Command Button to add more comboboxes and textboxes at the same time

    This is good enough! Thank you for the help

  6. #6
    Registered User
    Join Date
    05-20-2014
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    21

    Re: Userform Command Button to add more comboboxes and textboxes at the same time

    Here you go!
    Attached Files Attached Files

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform Command Button to add more comboboxes and textboxes at the same time

    I've updated the workbook and attach it.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-20-2014
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    21

    Re: Userform Command Button to add more comboboxes and textboxes at the same time

    Works beautifully, thank you once again

  9. #9
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Userform Command Button to add more comboboxes and textboxes at the same time

    HI Norie,

    I am really interested with your attachment. can you send the complete version for my learning purpose.

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Userform Command Button to add more comboboxes and textboxes at the same time

    Faridwahidi

    Not quite sure what you mean by 'complete' version.

    The first file I attached was a simple example, the file I attached in post #7 is an update of the file the OP attached in post #6, there are no other files involved.

+ 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. SetFocus doesn't work properly on a Userform on ComboBoxes and TextBoxes
    By pimre in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-15-2013, 03:15 PM
  2. UserForm, TextBoxes/ComboBoxes & Typing Control Error
    By wipMan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2013, 07:52 AM
  3. userform with 3 comboboxes and textboxes send to sheet
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2013, 03:15 PM
  4. Data Validation for all TextBoxes and Comboboxes in Userform
    By singhabhijitkumar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-12-2010, 05:48 PM
  5. How to empty all comboboxes and textboxes in a userform
    By LoveCandle in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-06-2009, 02:28 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