![]() |
#2
owenlu19812014-04-08 08:23
|
Private Sub Command1_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub
Private Sub Command2_Click()
Label1 = "-"
Text3.Text = Val(Text1.Text) - Val(Text2.Text)
End Sub
Private Sub Command3_Click()
Label1 = "*"
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub
Private Sub Command4_Click()
Label1 = "/"
Text3.Text = Val(Text1.Text) / Val(Text2.Text)
If Val(Text2.Text) = "0" Then
MsgBox "除数不能为0"
End If
End Sub