Programming Reference Manual
 
Syntax
 
RunBasicScript FileName$[, Command$]
 
Description
Play a macro, specified by FileName. Execution will continue at the following statement after the macro has completed.
 
Note: Although this instruction is equivalent to the MacroRun statement, the internal handling works different. RunBasicScript starts a new instance of the Basic Script Editor evironment allowing the script to be run totally independent of previously loaded classes or other memory cluttering objects.
Normally the MacroRun statement is sufficient to execute an external script, however, if you experience stability problems, try RunBasicScript instead.
 
Parameter
Description
FileName$
Run the macro named by this string value.
Note: when parsing a temporary script file, the temporary file is automatically deleted after completion.
A temporary file begins with "temporary.{filename}.bas".
Command$ 
Pass this string value as the macro's Command$ value.
See Also
Example
 
Sub Main
    Debug.Print "Before Demo"
    RunBasicScript "o:\AdminSQL\SCRIPTS\Demo.bas"
    Debug.Print "After Demo"
End Sub