touyets17
asked on
automatically run macro/module after import of .bas file
Hi all,
My code imports a module (.bas file) into an excel file (code is below) but I would like it to automatically run that same module after it is imported. I try to reference the macro name (TestMacro) in teh visual basic express 2010 project that i created but of course it can not refer to it. so is tehre a way to programmably run a macro/module liek this?
thanks in advance,
Simon
My code imports a module (.bas file) into an excel file (code is below) but I would like it to automatically run that same module after it is imported. I try to reference the macro name (TestMacro) in teh visual basic express 2010 project that i created but of course it can not refer to it. so is tehre a way to programmably run a macro/module liek this?
thanks in advance,
Simon
ExcelApp.ActiveWorkbook.VBProject.VBComponents.Import(directory2 & "\" & fileName2)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER