+ Reply to Thread
Results 1 to 7 of 7

List boxes not displaying choices

  1. #1
    Registered User
    Join Date
    05-20-2008
    MS-Off Ver
    2003 suite
    Posts
    64

    List boxes not displaying choices

    Hello all. I'm very new to the VB experience and am having trouble getting the choices in my list boxes to show up.

    Here's my code.

    Please Login or Register  to view this content.
    Am I missing something?

    Thanks!
    Last edited by NBVC; 03-10-2009 at 01:21 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: List boxes not displaying choices

    Try this
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: List boxes not displaying choices

    Your code should be in the Initialize event of the userform.

    Your routine name means that is treated as a private sub in the userform object. Userform1_Initialize is not an event.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    05-20-2008
    MS-Off Ver
    2003 suite
    Posts
    64

    Re: List boxes not displaying choices

    That was it! It's always the little stuff...

    Thanks Andy!

    Quote Originally Posted by Andy Pope View Post
    Your code should be in the Initialize event of the userform.

    Your routine name means that is treated as a private sub in the userform object. Userform1_Initialize is not an event.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-20-2008
    MS-Off Ver
    2003 suite
    Posts
    64

    Re: List boxes not displaying choices

    Well, I'm working on a different project and am having the same problem.

    The Initialize starts out like this:

    Please Login or Register  to view this content.
    But I get an error pointing to this Module. It highlights UserForm1.show

    Please Login or Register  to view this content.
    The name of the form is UserForm1.

    It works in the other project!!

    Does it matter what order the Subs are in? Cause that's the only difference I can find.

    Thanks!

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: List boxes not displaying choices

    You need to step through the code line by line as the error is occuring within the userform load/initialize process.

  7. #7
    Registered User
    Join Date
    05-20-2008
    MS-Off Ver
    2003 suite
    Posts
    64

    Re: List boxes not displaying choices

    Thanks for teaching a noob Andy. Got it to work. Thanks!

+ 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