+ Reply to Thread
Results 1 to 5 of 5

Userform Combo Box Not Initializing

  1. #1
    Registered User
    Join Date
    07-18-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Userform Combo Box Not Initializing

    I have simplified my problem and put it in the attached file. The problem is, when I click a button that calls userform.show, the combobox is not initialized. I am unsure as of how the method initialize is even called, although I am fairly sure it is supposed to be in the userform code. I've searched online for quite a while on this subject, and I have also referred to several guides on using userforms, but none of them have solved my problem.

    I have put in

    Please Login or Register  to view this content.
    in my Sheet1 code.

    My Userform1 code looks like this:
    Please Login or Register  to view this content.
    Any thoughts or advice would be greatly appreciated.

    Userform 2012 07 18 at 1456 Luo.xlsm

  2. #2
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Userform Combo Box Not Initializing

    How about?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-18-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Userform Combo Box Not Initializing

    Did it work for you? It's not working on my computer, and if it did on yours, something must be funny with my settings.

    The code for Userform1 is now
    Please Login or Register  to view this content.
    But it still appears as

    error.png

  4. #4
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Userform Combo Box Not Initializing

    See how the "u" in Userform1" and the "i" in "Initialize" is not capitalized?

    Try using the drop down menus (at the top of the module) to create Private Sub userform1_initialize()

    Using the left side, click on userform1 and then, using the right side, click on initialize. It should create for you:

    Please Login or Register  to view this content.
    Then cut and paste:

    Please Login or Register  to view this content.
    So that you end up with:

    Please Login or Register  to view this content.
    That should solve your problem.

  5. #5
    Registered User
    Join Date
    07-18-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Userform Combo Box Not Initializing

    Thank you SO much! I had no idea that you had to select "Initialize" from the combobox. None of the guides I read explicitly said that, so I just wrote it myself. It's strange though, that you need to do that, because I right clicked my userform to get to its code, and one would think that would be enough. Nonetheless, 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)

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