vb编辑的简单的代码,但是无法执行command2,Help!

来源:百度知道 编辑:UC知道 时间:2024/04/25 12:10:39
Private Sub Command1_Click()
Text3.Text = "X"
Randomize
Text1.Text = Val(Int(Rnd * 50))
Text2.Text = Val(Int(Rnd * 50))
Text3.Text = Val(InputBox(" Please Input result"))
End Sub

Private Sub Command2_Click()
If Text3.Text = Val(Text1.Text) + Val(Text2.Text) Then
Select Case Val(Text3.Text) //*当Text3.text正确时在进行情况选择*//
Case Val(Text3.Text) > 80 //如果result>80时label显示相映的字符,下列雷同//
Label1.Caption = "80 Good"
Case Val(Text3.Text) > 60
Label1.Caption = "60 Good"
Case Val(Text3.Text) > 20
Label1.Caption = "20 Good"
Case Val(Text3.Text) > 0
Label1.Caption = "0 good"
End Select
Else
Label1.Caption = "Wrony,again"
End If
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Form_Load()
Command1.Caption = &quo

Private Sub Command2_Click()
If Val(Text3.Text) = Val(Text1.Text) + Val(Text2.Text) Then
Select Case True
Case Val(Text3.Text) > 80
Label1.Caption = "80 Good"
Case Val(Text3.Text) > 60
Label1.Caption = "60 Good"
Case Val(Text3.Text) > 20
Label1.Caption = "20 Good"
Case Val(Text3.Text) > 0
Label1.Caption = "0 good"
End Select
Else
Label1.Caption = "Wrong,Again"
End If
End Sub

==========
搞不懂为什么我每次提交的时候,百度都在我的引号附近加上反斜杠