Hi,
Change the content of the second combobox it the first combobox
selected index changed event.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList
ComboBox2.DropDownStyle = ComboBoxStyle.DropDownList
ComboBox1.Items.Add("Fruit")
ComboBox1.Items.Add("Pets")
ComboBox1.Items.Add("Cars")
ComboBox1.SelectedIndex = 0
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
ComboBox2.Items.Clear()
Select Case ComboBox1.SelectedIndex
Case 0
ComboBox2.Items.Add("Apple")
ComboBox2.Items.Add("Peach")
ComboBox2.Items.Add("Orange")
Case 1
ComboBox2.Items.Add("Dog")
ComboBox2.Items.Add("Cat")
ComboBox2.Items.Add("Parrot")
Case Else
ComboBox2.Items.Add("Pickup truck")
ComboBox2.Items.Add("SUV")
ComboBox2.Items.Add("Compact Car")
End Select
ComboBox2.SelectedIndex = 0
End Sub
Ken
--------------
"Alonso" <Al****@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com:
Hi,
I have two drop downs and the content of the second one must changed
everytime the user changes the selection in the first one. Is any easy way
of doing this?
Thanks in advance.
Alonso
--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (
http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.6 - Release Date: 6/25/2004