Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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) |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
simple VBA question | Excel Programming | |||
simple question, hopefully a simple answer! | Excel Programming | |||
Simple Question | Excel Programming |