Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Running a macro in another workbook

I have a workbook called "blank" that has a macro in it called "report". I
want to call the "report" macro from several other workbooks and copy the
results back to the workbook/sheet that asked the "report" macro to run.

Thanks for your help

Blue


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Running a macro in another workbook

Use Application.run to call a macro in a other open workbook
Some notes on this from Chip Pearson

Application.Run "Book1.xls!MacroName"

Or, if the book name contains spaces, (watch the quotes)

Application.Run "'Book One.xls'!MacroName"


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Blue" wrote in message .. .
I have a workbook called "blank" that has a macro in it called "report". I
want to call the "report" macro from several other workbooks and copy the
results back to the workbook/sheet that asked the "report" macro to run.

Thanks for your help

Blue




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Running a macro in another workbook

Ron

Thanks for the reply, the workbook with the macro in will be closed, will
this still work?

Blue
"Ron de Bruin" wrote in message
...
Use Application.run to call a macro in a other open workbook
Some notes on this from Chip Pearson

Application.Run "Book1.xls!MacroName"

Or, if the book name contains spaces, (watch the quotes)

Application.Run "'Book One.xls'!MacroName"


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Blue" wrote in message

.. .
I have a workbook called "blank" that has a macro in it called "report".

I
want to call the "report" macro from several other workbooks and copy

the
results back to the workbook/sheet that asked the "report" macro to run.

Thanks for your help

Blue






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Running a macro in another workbook

Hi Blue

will this still work?

No

If you want to use the macro in all your workbooks you can copy the macro in
your personal.xls.
This is a (normal) hidden workbook that is loaded automatically by Excel.
When you record a macro, you have the option of recording it to your
Personal Macro Workbook.
The file, Personal.xls, is stored in your \XLStart directory.

The easiest is to record a dummy macro and choose Personal Macro Workbook.
Excel create the file for you this way.
Then copy your macro in this file and delete the dummy macro.





--
Regards Ron de Bruin
http://www.rondebruin.nl


"Blue" wrote in message . ..
Ron

Thanks for the reply, the workbook with the macro in will be closed, will
this still work?

Blue
"Ron de Bruin" wrote in message
...
Use Application.run to call a macro in a other open workbook
Some notes on this from Chip Pearson

Application.Run "Book1.xls!MacroName"

Or, if the book name contains spaces, (watch the quotes)

Application.Run "'Book One.xls'!MacroName"


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Blue" wrote in message

.. .
I have a workbook called "blank" that has a macro in it called "report".

I
want to call the "report" macro from several other workbooks and copy

the
results back to the workbook/sheet that asked the "report" macro to run.

Thanks for your help

Blue








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Running a macro in another workbook

Ron

I need to make things a bit clearer.

The "blank" workbook with the "report" macro is on a network. The "report"
macro will be called by other workbooks also on the network. The "blank"
workbook will be closed. The other workbook will opened by different people
on different days, no personal.xls will be used


Example
Open other workbook - Need data provided by "report" macro.
Ask report macro to get the data - this will be copied into a tab in
"blank" workbook.
Copy "report" data from "blank" to other workbook.

How do I get "blank" open run "report" and copy data back to the workbook
that requested the data.

There are reasons why the "report" macro cannot be in the same workbook that
is requesting the information.

Thanks

Blue




"Ron de Bruin" wrote in message
...
Hi Blue

will this still work?

No

If you want to use the macro in all your workbooks you can copy the macro

in
your personal.xls.
This is a (normal) hidden workbook that is loaded automatically by Excel.
When you record a macro, you have the option of recording it to your
Personal Macro Workbook.
The file, Personal.xls, is stored in your \XLStart directory.

The easiest is to record a dummy macro and choose Personal Macro Workbook.
Excel create the file for you this way.
Then copy your macro in this file and delete the dummy macro.





--
Regards Ron de Bruin
http://www.rondebruin.nl


"Blue" wrote in message

. ..
Ron

Thanks for the reply, the workbook with the macro in will be closed,

will
this still work?

Blue
"Ron de Bruin" wrote in message
...
Use Application.run to call a macro in a other open workbook
Some notes on this from Chip Pearson

Application.Run "Book1.xls!MacroName"

Or, if the book name contains spaces, (watch the quotes)

Application.Run "'Book One.xls'!MacroName"


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Blue" wrote in message

.. .
I have a workbook called "blank" that has a macro in it called

"report".
I
want to call the "report" macro from several other workbooks and

copy
the
results back to the workbook/sheet that asked the "report" macro to

run.

Thanks for your help

Blue










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
Running macro in another workbook Barb Reinhardt Excel Worksheet Functions 1 April 25th 07 08:30 PM
Running Same macro in 250 Worksheets in Same Workbook halem2 Excel Worksheet Functions 3 March 24th 06 08:51 AM
Problems in running a macro in another workbook dhatul Excel Discussion (Misc queries) 3 January 20th 06 08:01 AM
Help:Running a macro in one excel workbook from another workbook R Kapoor Setting up and Configuration of Excel 3 January 13th 06 05:11 AM
running a macro ina workbook that doesnt have that macro Paul Excel Programming 2 February 18th 04 01:47 AM


All times are GMT +1. The time now is 04:24 PM.

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"