View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Automatically Excuting a Macro in a different workbook ?


Set WB = Workbooks.Open "Book2.xls"
Application.Run "'Book2.xls'!Macro1"


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"dim" wrote in message
...
Hi folks,

I have two workbooks - Book1 and Book2.

In Book1 I have Macro1,

In Book2 I also have a Macro1 (Or I can name it differently if necessary)
and also Macro2 and Macro3 and Macro4 and....etc etc

I want Macro1 in Book1 to open Book2 and then after opening to
automatically
execute Book2's Macro1 ?

Sometimes I might want it to execute a different one of the Macros in
Book2
automatically after opening so I can't just include it as part of an
auto-open...I think...

Please Help!!!....this is a very substantial stumbling block for my
current
file if I can't get over it.... :-(