Public Class Form1
Dim n1(5) As Integer
Dim n2(5, 3) As Integer
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ComboBox1.Items.Add("1")
ComboBox1.Items.Add("2")
ComboBox1.Items.Add("3")
ComboBox1.Items.Add("4")
ComboBox1.Items.Add("5")
n1(1) = 100
n1(2) = 200
n1(3) = 300
n1(4) = 400
n1(5) = 500
ComboBox2.Items.Add("1")
ComboBox2.Items.Add("2")
ComboBox2.Items.Add("3")
n2(1, 1) = 20
n2(1, 2) = 40
n2(1, 3) = 60
n2(2, 1) = 22
n2(2, 2) = 42
n2(2, 3) = 62
n2(3, 1) = 23
n2(3, 2) = 44
n2(3, 3) = 64
n2(4, 1) = 27
n2(4, 2) = 49
n2(4, 3) = 75
n2(5, 1) = 31
n2(5, 2) = 55
n2(5, 3) = 82
End Sub
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedIndex >= 0 Then
TextBox1.Text = n1(ComboBox1.SelectedIndex + 1)
End If
ComboBox2_SelectedIndexChanged(Nothing, Nothing)
End Sub
Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged
If ComboBox1.SelectedIndex >= 0 AndAlso ComboBox2.SelectedIndex >= 0 Then
TextBox2.Text = n2(ComboBox1.SelectedIndex + 1, ComboBox2.SelectedIndex + 1)
End If
End Sub
End Class