Dynamically load & execute VB function
Posted on 2003-10-28
I'm using MS Access for fast multi-thread web pages download from the internet and save parsed results into database or files
I would like to create sort of profiles for each job
I need a way to setup number of functions like Start_Download() and Finalize_Download() for each profile
and I want to display profiles in drop-down menu, so once user select some profile and click "GO" button I want my program to call functions (Start_Download() and Finalize_Download()) of selected profile
and I want this functions to have access to few global variables.
I have tried to use separate modules for each profile
I can do something like "call Module1.Start_Download(parameters)" but for some reason I can't use something like
call Me.Application.Modules("Module1").Start_Download(parameters) (it said function is not found)
and also Eval("Module1.Start_Download(parameters)") is not working.
I don't mind to use Classes instead of functions as long as I can select class by name (programmatically) - if someone can give me an example of how to use nested classes in different modules
any idea on how to accomplish this?
I could use One module and modify this module with different programs for each profile stored in databases (or modules) but i don't want to do it because it will be hard to control & save future program modifications in this approach.
Any help is appriciated