Results 1 to 3 of 3

Can't get combo box in user form to populate

Threaded View

  1. #1
    Registered User
    Join Date
    05-14-2015
    Location
    Tulsa, USA
    MS-Off Ver
    2013
    Posts
    2

    Can't get combo box in user form to populate

    Hi all,

    I'm building a user form to input data to a sheet. Everything works except the combo box, which won't populate. I've tried the forums here, Microsoft help, and YouTube, but I can't find anything wrong with the methods I've tried. I'm pretty new at this, so it's probably some obvious difference between the instructions and my code that I'm not noticing. Here's my original code:

    Option Explicit
    
    Sub userform_intialize()
        'Fill combobox in the form
        With UnitTypeUserForm.UnitTypeCB
            .AddItem "Option 1"
            .AddItem "Option 2"
            .AddItem "Option 3"
            .AddItem "Option 4"
        End With
        'UnitTypeUserForm.UnitTypeCB.ListIndex = 0
    End Sub
    When this didn't work, I tried a different style:

    Option Explicit
    
    Sub userform_intialize()
        'Fill combobox in the form
        UnitTypeCB.List = Array("Single-family Home", "Apartment Floorplan", "Condominium", "Commercial Property")
        'UnitTypeUserForm.UnitTypeCB.ListIndex = 0
    End Sub
    I've placed this code in "ThisWorkbook" and the form code module and I've tried commenting out the list index line in case it was causing problems. No matter what I've tried, the combo box is always blank. Any suggestions?
    Last edited by KDrew; 05-14-2015 at 07:10 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Use vlookup to auto populate a combo box in user forms
    By katieshields in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2014, 09:45 AM
  2. How to populate a text box in the details form from a combo box
    By Lloyd Blankfein in forum Access Tables & Databases
    Replies: 0
    Last Post: 06-20-2013, 05:40 AM
  3. 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
  4. Calling a user form initialize sub when entering the form to populate combobox...
    By regupnorth in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-02-2012, 07:24 AM
  5. help with user form and combo box
    By TechRetard in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-01-2011, 04:56 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