+ Reply to Thread
Results 1 to 7 of 7

Adding dynamic named ranges to combo boxes in userform

  1. #1
    Registered User
    Join Date
    02-21-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Office 2010
    Posts
    96

    Adding dynamic named ranges to combo boxes in userform

    Hi.

    I'm hoping this is something simple that can be fixed. What i am trying to do is i have a userform with 2 combo boxes. The first combo box has a validation list i am pulling from a sheet with the following code:

    Please Login or Register  to view this content.
    What i need is when the user selects a value in the first combo box, only certain values for the second combobox that are applicable to the value in the first combo box should show. This is the code i have tried to use but had no luck.

    Please Login or Register  to view this content.
    So if i pick Test1 from combobox1, the validation list in cell D1 should be filled into combobox2 however this is not the case. If i pick Test1, combobox2 has no values in it.

    Any help is appreciated!

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Adding dynamic named ranges to combo boxes in userform

    Hi

    I would recommend that you read this:

    http://contextures.com/xlDataVal02.html

    come back if you still need help afterwards.

  3. #3
    Registered User
    Join Date
    02-21-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Office 2010
    Posts
    96

    Re: Adding dynamic named ranges to combo boxes in userform

    Quote Originally Posted by mehmetcik View Post
    Hi

    I would recommend that you read this:

    http://contextures.com/xlDataVal02.html

    come back if you still need help afterwards.
    That's where i got the idea from.

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Adding dynamic named ranges to combo boxes in userform

    see if it helps you
    Attached Files Attached Files
    Last edited by john55; 06-01-2013 at 09:29 AM.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  5. #5
    Registered User
    Join Date
    05-31-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Adding dynamic named ranges to combo boxes in userform

    What about adding the third combo box, how can we do that, I tried but in vain. any help would be highly appreciated. Thanks in Advance

  6. #6
    Registered User
    Join Date
    02-21-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Office 2010
    Posts
    96

    Re: Adding dynamic named ranges to combo boxes in userform

    Quote Originally Posted by john55 View Post
    see if it helps you
    This worked perfectly. Thank you.

    Quote Originally Posted by khan2013 View Post
    What about adding the third combo box, how can we do that, I tried but in vain. any help would be highly appreciated. Thanks in Advance
    Did you try Johns code?

  7. #7
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Adding dynamic named ranges to combo boxes in userform

    Hi Spritz,
    Glad it helped you!

+ 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