DADiSP Worksheet Functions > Function Categories > ActiveX > Automation Server > EVALUATE
Evaluates a command string in DADiSP’s ActiveX Automation Server and returns the result as a string.
[out] BSTR result = Evaluate([in] BSTR "command")
"command" |
- |
A string, any valid expression. |
A string. The result or error message.
Visual Basic Example:
Dim DADiSP as Object
Dim str as String
’’’ Connect to DADiSP
Set DADiSP = CreateObject("dadisp.application")
’’’ Create a 2 Window Worksheet without prompting
Call DADiSP.Execute("Newworksheet(2, 0)")
’’’ Generate 3x3 random array, return result as a string
str = DADiSP.Evaluate("rand(3)")
’’’ show result
MsgBox(str)
Starts DADiSP as an ActiveX Automation server, creates a 2 Window Worksheet, generates a 3x3 random array and returns the result as a string.
Any DADiSP command can be executed. Multiple statements are separated by semicolons.
EVALUATE evaluates the command string and always returns the result or errors as a string.
See CALCULATE to evaluate a command string with optional arguments.
See EXECUTE to evaluate a command string in the current Worksheet without returning the result.
See GETDATA to return data from a command, Window or variable.