Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jim
 
Posts: n/a
Default Playing a macro from another workbook

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
  #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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract specific data into its own workbook via macro? Adrian B Excel Discussion (Misc queries) 2 February 24th 05 06:09 AM
Copying a workbook with custom toolbar assigned to a macro Matt W Excel Discussion (Misc queries) 1 February 4th 05 10:46 PM
Problem executing a macro from different workbook where it is Sergio Calleja Excel Discussion (Misc queries) 1 January 17th 05 12:38 PM
workbook macro help ditchy Excel Discussion (Misc queries) 2 December 27th 04 04:48 AM
workbook macro help ditchy Excel Discussion (Misc queries) 1 December 26th 04 09:54 AM


All times are GMT +1. The time now is 03:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"