| || |
how do I run modules, where module name is in a variable
Does anyone now how to run a module from a script, where instead of hard coding in the module name, it can call a module whose name is held in a variable. Similar to how the 'Run' methods allows calling a script from a script ...
a = "Script1"
b = "Module1"
' fails - what should the second line be?
Don't need explanations about why run works with scripts, just wanting to know if possible and how to do it for modules.
Re: how do I run modules, where module name is in a variable
No... you can't just "run" a module, rather you can run code in a Function of a Module. So if you create a Module called ModA and put all of the code into a Function in ModA called myFunction... it gets you the same thing.
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">sub main
'/// call the function in ModA
end sub</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">