mobileFX JavaScriptX - Google V8 JavaScript Embedded Framework
JavaScriptXLib ActiveX DLL / Modules Collection / Add Method

Required. Name of the Module.

Not Used.

In This Topic
    Add Method
    In This Topic
    Description
    Add a new module
    Syntax
    Visual Basic
    Public Function Add( _
       ByVal Name As String, _
       Optional ByRef Object As Variant _
    ) As Module
    Parameters
    Name

    Required. Name of the Module.

    Object

    Not Used.

    Example
    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; }"
            
    End Sub
    See Also