Call macros from another XL file

J

jamesa

How can I call
macro1
macro2
macro3
from a file named: Trainer Overview Template.xls
to use in a file named: Schedule Template.xls

Regards,
JA
 
T

Tom Ogilvy

application.Run "Trainer Overview Template.xls!Macro1"
application.Run "Trainer Overview Template.xls!Macro2"
application.Run "Trainer Overview Template.xls!Macro3"

or you can create a reference (in the vbe, Tools=>References; you should
have a unique project name for each workbook, not VBAProject) from Schedule
Template.xls to Trainer Overview Template.xls and call the macros like you
would call a local macro.
 
L

losmac

You need to open both files: Trainer Overview Template.xls and Schedule
Template.xls

Now, You can use macro1, macro2 and macro3 in Schedule Template.xls.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top