level 6
Private Sub Command1_Click()
Dim a
#, b#
, c#
a = Val(Text1.Text)
b = Val(Text2.Text)
if not isnumeric(text1) then
msgbox "输入有误"
elseif not isnumeric(text2) then
msgbox "输入有误"
elseIf Text3.Text = "+" Then
c = a + b
Text4.Text = c
ElseIf Text3.Text = "-" Then
c = a - b
Text4.Text = c
ElseIf Text3.Text = "*" Then
c = a * b
Text4.Text = c
ElseIf Text3.Text = "/" and len(text3.text)〈〉0 Then
c = a / b
Text4.Text = c
elseif Text3.Text = "/" and len(text3.text)=0 Then
msgbox "除数不能为零"
End If
End Sub
Private Sub Command2_Click()
End
End Sub
2013年04月24日 09点04分