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

Hello
Is it possible to open a book and make some of its macros run by code?, I
just can activate the macro editor in the macro i'm interest to run but i
can't make it run. My situation is like this: I have a workbook with a
button that opens another book which contain a macro i need to run in order
to find a value but I can't figure how to make it run without inserting the
code of that macro in my project code and repeat a code that is in the
workbook i just have opened.
Could someone help me, please



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default Run a macro of another workbook

Have a look at help on run.

sub test()
'open the other file
application.run "filename!macroname"
end sub

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in


"Audie G. Bencosme R." wrote in message
...
Hello
Is it possible to open a book and make some of its macros run by code?, I
just can activate the macro editor in the macro i'm interest to run but i
can't make it run. My situation is like this: I have a workbook with a
button that opens another book which contain a macro i need to run in

order
to find a value but I can't figure how to make it run without inserting

the
code of that macro in my project code and repeat a code that is in the
workbook i just have opened.
Could someone help me, please





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Run a macro of another workbook

Audie,

Application.Run "otherfile.xls!macroname"

John

"Audie G. Bencosme R." wrote:

Hello
Is it possible to open a book and make some of its macros run by code?, I
just can activate the macro editor in the macro i'm interest to run but i
can't make it run. My situation is like this: I have a workbook with a
button that opens another book which contain a macro i need to run in order
to find a value but I can't figure how to make it run without inserting the
code of that macro in my project code and repeat a code that is in the
workbook i just have opened.
Could someone help me, please


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Run a macro of another workbook

one way:

Application.Run "Workbook2.xls!MyMacro"


In article ,
"Audie G. Bencosme R." wrote:

Hello
Is it possible to open a book and make some of its macros run by code?, I
just can activate the macro editor in the macro i'm interest to run but i
can't make it run. My situation is like this: I have a workbook with a
button that opens another book which contain a macro i need to run in order
to find a value but I can't figure how to make it run without inserting the
code of that macro in my project code and repeat a code that is in the
workbook i just have opened.
Could someone help me, please



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
saving macro from workbook to Personal Macro Workbook KrispyData Excel Discussion (Misc queries) 1 March 25th 10 05:52 PM
Combine worksheets in multiple workbook in one workbook with a macro Sam Commar Excel Discussion (Misc queries) 2 April 2nd 09 01:09 PM
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook Ruchir Excel Worksheet Functions 1 July 25th 08 07:29 AM
Runing a macro in a workbook from another macro in other workbook dhatul Excel Discussion (Misc queries) 0 January 13th 06 06:27 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


All times are GMT +1. The time now is 02:10 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"