+ Reply to Thread
Results 1 to 7 of 7

Populating comboboxes in a userform

  1. #1
    Registered User
    Join Date
    01-22-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    4

    Populating comboboxes in a userform

    Hi! I have a user form and on it I have a Combobox. When I load the userform I would like the Combobox to be populated automatically from a range in the Excel spreadsheet. I have written the following code but does not appear to work..

    Please Login or Register  to view this content.
    Any help extremely appreciated!

    Best
    Last edited by metametrics; 01-23-2011 at 07:26 AM.

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

    Re: Populating comboboxes in a userform

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here


    For VBA the event fired when loading a userform is Initialize

    Please Login or Register  to view this content.
    The combobox has a rowsource property to take a range reference.
    Cheers
    Andy
    www.andypope.info

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

    Re: Populating comboboxes in a userform

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

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

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    01-22-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Populating comboboxes in a userform

    Excellent!! Thanks very much - works great!

  5. #5
    Registered User
    Join Date
    01-22-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Populating comboboxes in a userform

    Thanks very much!

  6. #6
    Registered User
    Join Date
    01-22-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Populating comboboxes in a userform

    Forgot your rating - here it is.

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

    Re: Populating comboboxes in a userform

    You also forgot the Code Tags,

+ 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