iphone8怎么开数据流量:关于vb,一个按钮, 其中第二个text

来源:百度文库 编辑:神马品牌网 时间:2024/05/09 20:22:58
新建四个text,一个按钮, 其中第二个text 要求能输入运算符(+ -x /),第一个和第三个文本框能输入数,点击按钮第四个能输入结果,求完全代码!!!
~~help!~ 大致说下代码也好!拜托大家

在点击按钮的过程中加入:

If Text1 = "" Or Text2 = "" Or Text3 = "" Then
MsgBox "请填写完整!", , "提示"
Else
If Val(Text1) Or Val(Text3) Then
Select Case Text2.Text
Case "+"
Text4.Text = Val(Text1.Text) + Val(Text3.Text)
Case "-"
Text4.Text = Val(Text1.Text) - Val(Text3.Text)
Case "×"
Text4.Text = Val(Text1.Text) * Val(Text3.Text)
Case "/"
Text4.Text = Val(Text1.Text) / Val(Text3.Text)
End Select
Else
MsgBox "请输入数值型?", , "提示"
End If
End If

太简单。

请去看书。

很简单嘛,就是数字的类型问题和复值问题,书上有的,我就不写了.