ModuleLoadThis Function
SyntaxGroupModuleLoadThis(ModuleCode$, CreateNew)
Flow ControlDescription
Load ModuleCode as a module. Does not execute the module. Macro's can not be loaded. Returns an object if successful, otherwise Nothing is returned.
See Also
Parameters Description ModuleCode$ Load the module code in 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, ModuleLoad
Sub Main Dim Obj As Object Set Obj = ModuleLoadThis("Sub DoIt" & vbCrLf & "End Sub", False) Obj.DoIt ' call Demo's DoIt method End Sub