) Private Sub Text1__KeyPress ( KeyAscii AS Integer ) If KeyAscii=13 Then ‘ 回车符的 ACSII 码是 13 a=Val ( Text1 ) If a>=0 or a<=100 Then Text2.SetFocus Else Text1. SetFocus : MsgBox ( “ 分数错 ” ) End If End If End Sub
B.
) Private Sub Text1__KeyPress ( KeyAscii AS Integer ) If KeyAscii=13 Then ‘ 回车符的 ACSII 码是 13 a=Val ( Text1 ) If a>=0 And a<=100 Then Text1.SetFocus Else Text2. SetFocus : MsgBox ( “ 分数错 ” ) End If End If End Sub
C.
) Private Sub Text1__KeyPress ( KeyAscii AS Integer ) If KeyAscii=13 Then ‘ 回车符的 ACSII 码是 13 a=Val ( Text1 ) If a<0 And a>100 Then Text2.SetFocus Else Text1. SetFocus : MsgBox ( “ 分数错 ” ) End If End If End Sub
D.
) Private Sub Text1__KeyPress ( KeyAscii AS Integer ) If KeyAscii=13 Then ‘ 回车符的 ACSII 码是 13 a=Val ( Text1 ) If a>=0 And a<=100 Then Text2.SetFocus Else Text1. SetFocus : MsgBox ( “ 分数错 ” ) End If End If End Sub
Private Sub Text1__KeyPress(KeyAscii AS Integer) If KeyAscii=13 Then ‘回车符的ACSII码是13 a=Val(Text1) If a>=0 or a<=100 Then Text2.SetFocus Else Text1. SetFocus MsgBox(“分数错”) End If End If End Sub
B.
Private Sub Text1__KeyPress(KeyAscii AS Integer) If KeyAscii=13 Then ‘回车符的ACSII码是13 a=Val(Text1) If a>=0 And a<=100 Then Text1.SetFocus Else Text2. SetFocus MsgBox(“分数错”) End If End If End Sub
C.
Private Sub Text1__KeyPress(KeyAscii AS Integer) If KeyAscii=13 Then ‘回车符的ACSII码是13 a=Val(Text1) If a<0 And a>100 Then Text2.SetFocus Else Text1. SetFocus MsgBox(“分数错”) End If End If End Sub
D.
Private Sub Text1__KeyPress(KeyAscii AS Integer) If KeyAscii=13 Then ‘回车符的ACSII码是13 a=Val(Text1) If a>=0 And a<=100 Then Text2.SetFocus Else Text1. SetFocus MsgBox(“分数错”) End If End If End Sub