I presume you are using VB because of 1) your use of strong typing and 2) if it was VBS, you wouldnt need the script control.
Dim i As Integer
i = 1
With ScriptControl1
.ExecuteStatement "i=25"
Debug.Print .Eval("i" 'Prints 25
Debug.Print .Eval("i=25" 'Prints True
Deub.Print i 'Prints 1
End With
Okay, thank you. Your premise was correct. I'm working in VB. This was my misunderstanding. I thought i would end up = 25. It doesn't but .Eval("i" does.
Next, will .Eval or .ExecuteStatement handle an If Then statement? Can you show me an example?
.ExecuteStatement "IF i > j THEN i = 50 ELSE j = 50 END IF"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.