ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Call macros from another XL file (https://www.excelbanter.com/excel-programming/278577-call-macros-another-xl-file.html)

JamesA

Call macros from another XL file
 
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

Tom Ogilvy

Call macros from another XL file
 
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.

--
Regards,
Tom Ogilvy


"jamesa" wrote in message
...
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




losmac

Call macros from another XL file
 
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.

Uzytkownik "jamesa" napisal w wiadomosci
...
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





All times are GMT +1. The time now is 07:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com