View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Usually when you want your code to run against lots of workbooks, you write it
using Activesheet references and activeworkbook (not ThisWorkbook).



Jim wrote:

I have a workbook that contains a macro I need to run on a large number of
other workbooks. Is it possible to play a macro from another workbook on the
current workbook with out copying either the data or the macro manually?

I've found that if I open the workbook containing the macro, and then open
one of the "target" workbooks, I can open the Run Macro dialog box in the
target workbook and all macros in both workbooks are displayed if "All Open
Workbooks" is selected in the "Macros in:" field on the Macro dialog.
However if I select the macro I need to run from the "source" workbook, the
macro only runs on it's workbook, not the "target".

Without copying and pasting the data from the target workbooks into the
source workbook and then running the macro, is there a simpler way?

Thanks for any help


--

Dave Peterson