Option Explicit
Dim d(7, 7) As String
'防止出现字母。
Private Sub Command1_Click()
Dim i As Long, j As Long
For i = 0 To 7
If d(0, i) = Text1.Text Then
Exit For
End If
Next i
For j = 0 To 7
If d(j, 0) = Text2.Text Then
Exit For
End If
Next j
If i > 0 And j > 0 And i < 8 And j < 8 Then
Text3.Text = d(j, i)
End If
End Sub
Private Sub Form_Load()
d(0, 0) = "0"
d(0, 1) = "50"
d(0, 2) = "49"
d(0, 3) = "48"
d(0, 4) = "47"
d(0, 5) = "46"
d(0, 6) = "45"
d(0, 7) = "44"
d(1, 0) = "0.5"
d(1, 1) = "97"
d(1, 2) = "97"
d(1, 3) = "97"
d(1, 4) = "97"
d(1, 5) = "97"
d(1, 6) = "97"
d(1, 7) = "97"
d(2, 0) = "1.0"
d(2, 1) = "94"
d(2, 2) = "94"
d(2, 3) = "94"
d(2, 4) = "94"
d(2, 5) = "94"
d(2, 6) = "94"
d(2, 7) = "94"
d(3, 0) = "1.5"
d(3, 1) = "92"
d(3, 2) = "92"
d(3, 3) = "92"
d(3, 4) = "92"
d(3, 5) = "91"
d(3, 6) = "91"
d(3, 7) = "91"
d(4, 0) = "2.0"
d(4, 1) = "89"
d(4, 2) = "89"
d(4, 3) = "89"
d(4, 4) = "89"
d(4, 5) = "89"
d(4, 6) = "88"
d(4, 7) = "88"
d(5, 0) = "2.5"
d(5, 1) = "87"
d(5, 2) = "86"
d(5, 3) = "86"
d(5, 4) = "86"
d(5, 5) = "86"
d(5, 6) = "86"
d(5, 7) = "86"
d(6, 0) = "3.0"
d(6, 1) = "84"
d(6, 2) = "84"
d(6, 3) = "84"
d(6, 4) = "83"
d(6, 5) = "83"
d(6, 6) = "83"
d(6, 7) = "83"
d(7, 0) = "3.5"
d(7, 1) = "82"
d(7, 2) = "81"
d(7, 3) = "81"
d(7, 4) = "81"
d(7, 5) = "81"
d(7, 6) = "80"
d(7, 7) = "80"
End Sub