Modules Property




Returns the collection of modules for the ScriptControl object. Read-only.


PowerBASIC Syntax


PROPERTY GET Modules () AS IScriptModuleCollection




There is always at least one module. If a module is not explicitly declared, an implicit Global module exists that is used for all added scripting code. The Global module can be accessed using the GlobalModule constant as an index to the Modules collection.


Example [PowerBASIC]




DIM pSc AS IScriptControl

DIM pModules AS IScriptModuleCollection


' Creates an instance of the Microsoft Script Control

pSc = NEWCOM "MSScriptControl.ScriptControl"

' Get a reference to the modules collection

pModules = pSc.Modules


Valid XHTML 1.0 Transitional