Link to home
Start Free TrialLog in
Avatar of touyets17
touyets17Flag for Ireland

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
ExcelApp.ActiveWorkbook.VBProject.VBComponents.Import(directory2 & "\" & fileName2)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of touyets17

ASKER

Perfect!