Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 25-11-2009
Member
 
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?
Reply With Quote
  #2  
Old 25-11-2009
Member
 
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
Reply With Quote
  #3  
Old 25-11-2009
Member
 
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:

Quote:
"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?
Reply With Quote
  #4  
Old 25-11-2009
Member
 
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"

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

Quote:
- The list name can contain "_"?
Yes

Quote:
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 ...)
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Dynamically listing comboBox"
Thread Thread Starter Forum Replies Last Post
Need Help With ComboBox Reyas Software Development 1 29-04-2012 12:53 PM
Getting an error while updating company?s listing on Bing Local Listing Lotas Technology & Internet 4 15-04-2011 10:48 AM
Combobox and Text value HarshaB Software Development 5 09-11-2009 07:16 PM
How to lock combobox JamesB Software Development 3 19-03-2009 07:20 PM
Add ComboBox in DataGrid in VB 6.0 Jateen Software Development 3 15-01-2009 06:31 PM


All times are GMT +5.5. The time now is 01:35 AM.