Execute a statement within the context of the module
Required. String containing the statement being executed.
Visual Basic |
---|
Public Sub ExecuteStatement( _ ByVal Statement As String _ ) |
Required. String containing the statement being executed.
Private Sub Form_Load() Dim SC As ScriptControl Dim m As Module Dim Result As Variant Set SC = New ScriptControl SC.Language = "JavaScript" SC.AllowUI = True SC.SitehWnd = Me.hWnd SC.UseSafeSubset = False SC.Timeout = 60 Set m = SC.Modules.Add("MyModule") m.AddCode "function goo(a,b,c){ return a+b+c; }" m.ExecuteStatement "goo(1,2,3)" End Sub