Dim a(2) As Integer
Dim b(2) As Integer
Dim c, d, f, g As Integer
f = 0
g = 0
a(0) = TextBox1.Text
a(1) = TextBox2.Text
a(2) = TextBox3.Text
b(0) = TextBox4.Text
b(1) = TextBox5.Text
b(2) = TextBox6.Text
For c = 0 To 2
For d = 0 To 2
If a(c) = b(d) Then
If c = d Then
f = f + 1
Else
g = g + 1
End If
End If
Next
Next
Label1.Text = TextBox4.Text & TextBox5.Text & TextBox6.Text & "=" & f & "A" & g & "B"