+ Reply to Thread
Results 1 to 5 of 5

One Combobox changing another's rowsource

  1. #1
    Registered User
    Join Date
    05-31-2011
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    8

    Unhappy One Combobox changing another's rowsource

    Hi there, I'm new to VBA and am looking for some assistance!

    I have created a userform that has 2 comboboxes, Region, City / County. I would like the comboboxes to pull data from the same sheet.

    I have set a static cell range in the rowsource area of the properties box of the Region combobox.

    What I would like to happen on the userform is the options available in the drop down menu of the City / County to be determined by the selection made previously in the Region combobox. So I need to use code so that the rowsource of the City / County combobox reacts dynamically to the selection made in the Region combobox.

    I have data inputted on columns C - G for the Region combobox to pull from.

    Hopefully somebody can help, I've attached a sample workbook, so would appreciate any assistance.

    Thanks in advance.

    John
    Attached Files Attached Files
    Last edited by johnliquid; 06-02-2011 at 05:00 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: One Combobox changing another's rowsource

    Your lists aren't really ideal for slecting from, you have "sub-headings" in them

    Try this,
    Please Login or Register  to view this content.
    Last edited by royUK; 06-02-2011 at 08:37 AM.
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    05-31-2011
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    8

    Smile Re: One Combobox changing another's rowsource

    Many thanks Roy, that's worked a treat!

    Not sure how to mark this as solved though...

    Thanks again

    John

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

    Re: One Combobox changing another's rowsource

    For information on how to use the forum please follow one of the links to our how to sections or frequently asked questions!
    Navigation bar including the How to...? dropdown
    How to videos
    Frequently asked questions

    I've corrected the code slightly

  5. #5
    Registered User
    Join Date
    05-31-2011
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: One Combobox changing another's rowsource

    Hi again,

    I will take a look at the forum rules when I get a moment

    I've encountered another related issue with code for getting the form to react dynamically to user input in combo boxes.

    I now have three combo boxes (Featured Post Area Category, Featured Post Category 1, Featured Post Category 2) whose contents I would like determined by the user selection 'Select Business' combo box.

    I've tried to adapt the code supplied earlier, but I don't have the requisite skills yet to make it work!

    Thanks in advance for any support, much appreciated!

    John
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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