B=3
The text box input a * b
The trigger condition, results of 30
How to solve? What function,
CodePudding user response:
Use the Replace function will be replaced with the variable character, the said number,CodePudding user response:
'engineering add components to Microsoft Script Control 1.0
'-- -- -- -- -- -- -- --
'Form1
'put a ScriptControl, a TextBox, a CommandButton
Option Explicit
Private Sub Command1_Click ()
With ScriptControl1
. Language="VBScript"
The Reset
'to add the known variables'
. AddCode "a=10
". AddCode "b=3"
'formula'
MsgBox. Eval (Text1)
End With
End Sub
Private Sub Form_Load ()
Text1. Text="a * b" 'default formula'
End Sub
CodePudding user response:
Must be a text boxWant to simple, if you can just text box tag
Such as text, text x text2. Text
CodePudding user response: