![]() |
A simple question
Hi, I have two workbooks, "A" and "B", and both are open and contain macros/functions. How do I call (execute), from "A", a macro in "B"? Is that possible? Thanks in advance for any help! ---Fausto |
A simple question
Try
Sub Test() Application.Run "B!Module1.Test" End Sub where you've defined a function called Test in Module1 of worksheet B. HTH "Fausto Arinos Barbuto" wrote: Hi, I have two workbooks, "A" and "B", and both are open and contain macros/functions. How do I call (execute), from "A", a macro in "B"? Is that possible? Thanks in advance for any help! ---Fausto |
A simple question
Application.Run "'B.xls'!myMacro"
-- HTH RP (remove nothere from the email address if mailing direct) "Fausto Arinos Barbuto" wrote in message ... Hi, I have two workbooks, "A" and "B", and both are open and contain macros/functions. How do I call (execute), from "A", a macro in "B"? Is that possible? Thanks in advance for any help! ---Fausto |
A simple question
Worked 100% well! Thanks so much, Bob! ---Fausto "Bob Phillips" wrote in message ... Application.Run "'B.xls'!myMacro" -- HTH RP (remove nothere from the email address if mailing direct) |
A simple question
Like this:
Application.Run "PERSONAL.XLS!Cleanup" ******************* ~Anne Troy www.OfficeArticles.com "Fausto Arinos Barbuto" wrote in message ... Hi, I have two workbooks, "A" and "B", and both are open and contain macros/functions. How do I call (execute), from "A", a macro in "B"? Is that possible? Thanks in advance for any help! ---Fausto |
A simple question
"Bob Phillips" wrote in message Application.Run "'B.xls'!myMacro" A brief observation though: the '' around B.xls seem to be unnecessary, as Application.Run "B.xls!myMacro" works fine. ---Fausto |
A simple question
"Anne Troy" wrote in message Like this: Application.Run "PERSONAL.XLS!Cleanup" Thanks, Anne. And if I want to be really picky, I might even call a function/sub like this: Application.Run "Consequences.xls!Flow.CalculatePressureDrop" where "Flow" is the name of the module where the function/sub "CalculatePressureDrop" resides. Now I can integrate my workbooks properly. :-) ---Fausto |
All times are GMT +1. The time now is 03:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com