Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Problem Calling VBScript Function

0
0
Hello!

We're having trouble reproducing your issue. We just ran this test program without any problems:
Module ConsoleTest
    Sub Main()
        Using engine AsNew Microsoft.ClearScript.Windows.VBScriptEngine
            engine.Execute("Public Sub Main() : Dim x : x = 5 : End Sub")
            engine.Script.Main()
        EndUsingEndSubEndModule
Can you think of anything you're doing that might be significantly different?

Also, the exception text you posted indicates TargetInvocationException, which should always have a non-null InnerException property. Can you examine that and tell us what you find?

Thanks!

Viewing all articles
Browse latest Browse all 2297