It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Multiple Combobox in VB 6.0

Moderator: dafunkymunky

Multiple Combobox in VB 6.0

Postby merkez42 on Sat Oct 29, 2011 1:29 pm

I want to make multiple combobox associated with each other. For example,

I have two combobox called country and city


First, there are countries in the first combobox and there is no city in the second combobox

When I select USA in the first combobox. There will be cities of USA in the second combobox.

When I select Canada, Cities of USA will disappear and cities of Canada will appear in the second combobox.

I need this, I request you to help me.

Thank you...
merkez42
 
Posts: 1
Joined: Sat Oct 29, 2011 1:24 pm

Re: Multiple Combobox in VB 6.0

Postby sanjon on Sat Oct 29, 2011 6:19 pm

You would probably have to store the countries and their corresponding cities somewhere inside the program or in an external file. Then, when the ComboBox1 text is changed (there is an event for that), all you need to do is load the names of the cities into ComboBox2. There is a method for doing that.
sanjon
 
Posts: 40
Joined: Sun Dec 05, 2010 6:20 pm


Who is online

Users browsing this forum: No registered users and 2 guests