-
Evaluation a function
I need to evaluate a function typed in by the user at runtime (actually read
from a DB table, but you get the picture). I understand that this is possible
using certain DLLs. Can someone give me a thirty-second synopsis of what
I need to do?
Thanks,
Matthew Cromer
-
Re: Evaluation a function
Hi Matthew, perhaps this will get you started. Put a Microsoft Script
Control (MSSCRIPT.OCX) on a form
Private Sub Form_Load()
Dim a%, b%
a = 2: b = 4
Debug.Print ScriptControl1.Eval(a * b)
End Sub
HTH
Matthew Cromer <matthew@sdaconsulting.com> wrote in message
news:39099294$1@news.devx.com...
>
> I need to evaluate a function typed in by the user at runtime (actually
read
> from a DB table, but you get the picture). I understand that this is
possible
> using certain DLLs. Can someone give me a thirty-second synopsis of what
> I need to do?
>
> Thanks,
>
> Matthew Cromer
-
Re: Evaluation a function
"Norm Cook" <normarnet@arn.net> wrote:
>Hi Matthew, perhaps this will get you started. Put a Microsoft Script
>Control (MSSCRIPT.OCX) on a form
>
>Private Sub Form_Load()
> Dim a%, b%
> a = 2: b = 4
> Debug.Print ScriptControl1.Eval(a * b)
>End Sub
>HTH
Thanks Norm:
In fact, you don't have to put anything on a form.
This will also work:
Public Sub TestScript
Dim objScriptControl As ScriptControl
Set objScriptControl = New ScriptControl
With objScriptControl
.Language = "VBScript"
MsgBox .Eval("1 + 1 + 2")
End With
End Sub
-
Re: Evaluation a function
Matthew,
> I need to evaluate a function typed in by the user at runtime
you could always try Balena's Runtime Evaluator VBPJ Feb '98 or try the
locator code FB0298.
I thought it was quite good actually.
Eddie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|