字符串作数学运算

Private Sub Form_Load()
Dim sc As Object
Set sc = CreateObject("ScriptControl")

sc.Language = "VBScript"

S = sc.Eval("123 + 4")'或S = sc.Eval("123" & "+" & "4")
MsgBox S
End Sub
原文地址:https://www.cnblogs.com/lbnnbs/p/4784823.html