+ Reply to Thread
Results 1 to 3 of 3

UserForm dependent dropdown menus refresh

  1. #1
    Registered User
    Join Date
    05-05-2014
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    3

    UserForm dependent dropdown menus refresh

    Hello,

    I have put together a user form with two ComboBoxes, one dependent on the other. The first box has a drop down menu from which the user selects a name, and the second drop down populates a list from a named range according to the user's selection in the first box. The code I used is as follows:

    Please Login or Register  to view this content.
    This has worked so far, however, if one selects a name in ComboBox1 and then changes their selection (ex. Initially selects John Smith from the first menu, and then changes their selection to Mike Roberts) there is an error. I am not sure why - I think the issue stems from the 'Clear' function but I am not sure how to resolve it.

    Thanks!
    Last edited by arlu1201; 05-06-2014 at 12:31 AM. Reason: Use code tags.

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: UserForm dependent dropdown menus refresh

    You can't .Clear a combobox that is tied to a rowsource.

    The first time the code runs, it assigns the rowsource. When it runs again, a rowsource has been already be assigned.

    You have to remove the rowsource first, then use clear.
    Please Login or Register  to view this content.
    Last edited by Tinbendr; 05-06-2014 at 12:53 PM.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    05-05-2014
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: UserForm dependent dropdown menus refresh

    Thank you so much that worked perfectly!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Dependent dropdown validation - dependent data is string
    By jnewby in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-12-2014, 07:50 PM
  2. dependent dropdown for country state in excel userform usin VBA
    By anuraag1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2013, 07:46 AM
  3. Autofiltering dropdown menus on userform from external database
    By Solaris in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2012, 08:12 AM
  4. UserForm DropDown Menus
    By stojko89 in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 11-16-2011, 08:16 AM
  5. save data to worksheet dependent on userform dropdown
    By mhill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2009, 03:57 PM

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