如题所述
第1个回答 2016-03-24
vb写的四则运算如下:
Private Sub Command1_Click()
On Error GoTo err
Dim s As Object
Dim Bds As String '表达式
Set s = CreateObject("MSScriptControl.ScriptControl")
s.Language = "VBScript"
Bds = Text1
Text2 = s.Eval(Bds)
Exit Sub
err:
Text2 = err.Description
End Sub本回答被网友采纳
Private Sub Command1_Click()
On Error GoTo err
Dim s As Object
Dim Bds As String '表达式
Set s = CreateObject("MSScriptControl.ScriptControl")
s.Language = "VBScript"
Bds = Text1
Text2 = s.Eval(Bds)
Exit Sub
err:
Text2 = err.Description
End Sub本回答被网友采纳
第2个回答 2016-03-24
你是根据四则运算的公式,直接给出结果,是吧?