Public Class Form1 Dim d1 As Integer() = {1, 2, 3, 4, 5} Dim d2 As Integer() = {50, 40, 30, 20, 10} Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load ComboBox1.Items.Add("データ1") ComboBox1.Items.Add("データ2") End Sub Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged If ComboBox1.SelectedIndex = 0 Then ComboBox2.DataSource = d1 Else ComboBox2.DataSource = d2 End If End Sub Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged Console.WriteLine(ComboBox2.SelectedIndex) End Sub End Class