ModuleLoad Function
SyntaxGroupModuleLoad(ModuleName$, CreateNew)
Flow ControlDescription
Load a module. Does not execute the module. Macro's can not be loaded. Returns an object if successful, otherwise Nothing is returned.Sandbox
Sandbox mode may block this function.
See Also
Parameters Description ModuleName$ Load the module named by this string value. CreateNew Return a new instance if True. Otherwise return the default instance. A class module does not have a default instance. A code module can not have a new instance.
MacroCheck, MacroCheckThis, MacroRun, MacroRunThis, ModuleLoadThis
Sub Main Dim Obj As Object Set Obj = ModuleLoad("Demo") Obj.DoIt ' call Demo's DoIt method End Sub