为什么我的VB计算机程序是错的
Private Sub Command1_Click()Dim a, b, c, d As Integer
Text1.Text = Text1.Text + "1"
End Sub
Private Sub Command10_Click()
Text1.Text = Text1.Text + "0"
End Sub
Private Sub Command11_Click()
Text1.Text = ""
a = 1
b = Val(Text1.Text)
End Sub
Private Sub Command12_Click()
Text1.Text = ""
a = 2
b = Val(Text1.Text)
End Sub
Private Sub Command13_Click()
Text1.Text = ""
a = 3
b = Val(Text1.Text)
End Sub
Private Sub Command14_Click()
Text1.Text = ""
a = 4
b = Val(Text1.Text)
End Sub
Private Sub Command2_Click()
Text1.Text = Text1.Text + "2"
End Sub
Private Sub Command3_Click()
Text1.Text = Text1.Text + "3"
End Sub
Private Sub Command4_Click()
Text1.Text = Text1.Text + "4"
End Sub
Private Sub Command5_Click()
Text1.Text = Text1.Text + "5"
End Sub
Private Sub Command6_Click()
Text1.Text = Text1.Text + "6"
End Sub
Private Sub Command7_Click()
Text1.Text = Text1.Text + "7"
End Sub
Private Sub Command8_Click()
Text1.Text = Text1.Text + "8"
End Sub
Private Sub Command9_Click()
Text1.Text = Text1.Text + "9"
End Sub
Private Sub Command15_Click()
c = Val(Text1.Text)
Text1.Text = ""
Select Case a
Case 1: Text1.Text = b + c
Case 2: Text1.Text = b - c
Case 3: Text1.Text = b * c
Case 4: Text1.Text = b / c
End Select
End Sub
就是得不到结果,不知道为何