Calling excel macro not located in that workbook.
On Apr 1, 4:15*pm, "Ron de Bruin" wrote:
Hi cr113
You can use Application.run
Application.Run "YourFile.xls!YourMacro"
--
Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm
"cr113" wrote in ...
Can I call an excel macro programmatically from another workbook in
Excel 2003?
For example suppose I have 2 workbooks, book1.xls and book2.xls:
book1.xls
* *module1
* * * *macro1
book2.xls
* *module2
* * * *macro2
How would I call book2.module2.macro2 from book1.module1.macro1?- Hide quoted text -
- Show quoted text -
I had to do a workbooks.open "book2" first, but it worked.
Thanks!
|