Hello, I have a question on using VBA to programme several ComboBoxes whose items are dynamically filled? I have a worksheet containing country names, states, and product, such as Country State Product 1 US MA Banana 2 US MA Orange 3 US WV Apple 4 US WV Apple 5 US CA Banana 6 Canada Quebec Orange 7 Canada Quebec Orange 8 Canada Albert Apple 9 Canada Albert Banana
I want to the 1st ComboBox to read the list of country names and filled by the unique country names, in this, I have two country names, US and Canada. After the 1st ComboBox is selected, I want the 2nd ComboBox to be dynamically filled with the appropriate state/province names, i.e., if the user chooses US, then the 2nd ComboBox only have the choices of MA, WV, and CA. Similarly for the 3rd ComboBox, if the user chooses US and then WV, the 3rd ComboBox should list Apple. So I figure that the code should dynamically search for unique country names, state names, and product names, and also be able to link the appropriate list of states to country, and appropriate list of product to state or provinces. But I don't have a clear idea how to do this. Can someone help me with some sample codes? Thanks a lot! --~--~---------~--~----~------------~-------~--~----~ ---------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,500 subscribers worldwide and receive many nice notes about the learning and support from the group. Our goal is to have 10,000 subscribers by the end of 2009. Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe -~----------~----~----~----~------~----~------~--~---