Results 1 to 4 of 4

Thread: Dynamically listing comboBox

  1. #1
    Join Date
    Nov 2009
    Posts
    33

    Dynamically listing comboBox

    I recently discovered this little challenge rather strong! In a UserForm, I have 3 combobox that are based on selections made in the past:
    1st combobox = defined area called LIST_GRP
    2nd combobox fed according to the selection of the first list by the formula = INDIRECT (LIST_GRP)
    3rd combobox: same principle as for the 2nd (= INDIRECT (combobox2))

    Except that apparently the combobox, it does not work as a validation list in which the INDIRECT function is accepted!

    My question is, how to make dynamic lists feeding my 3 combobox?

  2. #2
    Join Date
    Nov 2008
    Posts
    1,054

    Re: Dynamically listing comboBox

    I guess you have also appointed the other lists, so the operation goes through the 'RowSource' here is a example for a choice on the ComboBox1 to you to adapt for more ...

    Code:
    Private Sub ComboBox1_Change ()
    
    UserForm1. ComboBox2. RowSource = UserForm1. ComboBox1
    
    End Sub

  3. #3
    Join Date
    Nov 2009
    Posts
    33

    Re: Dynamically listing comboBox

    Thank you for the reply. That's exactly what I did except that it returns me the error message:

    "Runtime Error '380 ':
    Unable to set the property RowSource. Property value is invalid "
    I tried with ComboBox1.Value without much success too! Perhaps the problem is it that I appeal to a name list?

    Questions:
    - The list should be in a worksheet that is visible (and not hidden)?
    - The list name can contain "_"?

    Also, how is it that my first list (which works), that gives me only the first value of my list?

  4. #4
    Join Date
    Nov 2008
    Posts
    1,054

    Re: Dynamically listing comboBox

    Check out the name of your named ranges, they must be absolutely identical to the elements of your "List_GRP"

    - The list should be in a worksheet that is visible (and not hidden)?
    No

    - The list name can contain "_"?
    Yes

    Also, how is it that my first list (which works), that gives me only the first value of my list?
    As it's hard to say, you can save your file (change the values if there is confidential information ...)

Similar Threads

  1. Need Help With ComboBox
    By Reyas in forum Software Development
    Replies: 1
    Last Post: 29-04-2012, 12:53 PM
  2. Replies: 4
    Last Post: 15-04-2011, 10:48 AM
  3. Combobox and Text value
    By HarshaB in forum Software Development
    Replies: 5
    Last Post: 09-11-2009, 07:16 PM
  4. How to lock combobox
    By JamesB in forum Software Development
    Replies: 3
    Last Post: 19-03-2009, 07:20 PM
  5. Add ComboBox in DataGrid in VB 6.0
    By Jateen in forum Software Development
    Replies: 3
    Last Post: 15-01-2009, 06:31 PM

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
  •  
Page generated in 1,714,062,029.58620 seconds with 17 queries