+ Reply to Thread
Results 1 to 2 of 2

Add Combobox to existing userform

  1. #1
    Registered User
    Join Date
    09-06-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Add Combobox to existing userform

    Hi all,

    I have an excel workbook that I've added a form named UserForm1. Instead of manually adding Combo boxes to this form via the Toolbox in Visual Basics I would like to add by runing lines of code in a macro or function. How can this be done?

    The reason for this... The number of Combo boxes required for my report will change depending on variables derived from data housed in the worksheet when I run a macro. The macro may say add two combo boxes this time and 3 or 4 combo boxes the next time.

    I really just need the simple code of adding a combo box to an existing userform. Thank you

  2. #2
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: Add Combobox to existing userform

    Is there a maximum number of ComboBoxes required?
    If so have you thought of simply setting the not required ComboBoxes to .Visible=False.
    This way the code will always be available for each ComboBox also, and would make any ComboBoxes that are not required to be selected (Data dependant) are not visible.
    Alternately you could use the .Enabled=False in a similar way also.

+ 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] userform: when selecting Combobox value force user to choose from second combobox
    By mortphil in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-31-2014, 12:29 PM
  2. [SOLVED] Make combobox list options dependant on selection in another combobox within a userform
    By Vladimir_Dobvchenko in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-23-2013, 05:30 AM
  3. [SOLVED] send data from userform combobox to userform combobox
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-18-2013, 04:47 PM
  4. [SOLVED] VBA Userform ComboBox: Content of ComboBox based off of Conditional Statement
    By Brianandstewie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-16-2013, 03:00 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

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