Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to call a macro in a different file


I need to be able to call a macro that is located within another file.
It's no problem to call another macro that is within the same file, bu
as my project grows, it becomes too large and cumbersome. I need t
find some way to call a macro within another file.
Say, for example I have two workbooks (FileA and FileB). Within File
I have a macro (MacroA). At some point within that code, I need t
call a macro located in FileB named MacroB.

Is this possible?
Is it possible to do with VB Script?

TIA,
DejaV

--
DejaV
-----------------------------------------------------------------------
DejaVu's Profile: http://www.excelforum.com/member.php...fo&userid=2262
View this thread: http://www.excelforum.com/showthread.php?threadid=52484

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default How to call a macro in a different file

In the past I have created a custom toolbar and linked the macros from
another workbook to it, to perform actions

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200603/1
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to call a macro in a different file


Thanks Crowbar... but I could not get your link to work.

I know how to have different buttons call macros from differen
workbooks, but while my code is executing, I need it to call a macr
from another workbook

--
DejaV
-----------------------------------------------------------------------
DejaVu's Profile: http://www.excelforum.com/member.php...fo&userid=2262
View this thread: http://www.excelforum.com/showthread.php?threadid=52484

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How to call a macro in a different file

assuming FileB.xls is open

application.Run "FileB.xls!MacroB"

see help on the Run command for details.

--
Regards,
Tom Ogilvy


"DejaVu" wrote:


I need to be able to call a macro that is located within another file.
It's no problem to call another macro that is within the same file, but
as my project grows, it becomes too large and cumbersome. I need to
find some way to call a macro within another file.
Say, for example I have two workbooks (FileA and FileB). Within FileA
I have a macro (MacroA). At some point within that code, I need to
call a macro located in FileB named MacroB.

Is this possible?
Is it possible to do with VB Script?

TIA,
DejaVu


--
DejaVu
------------------------------------------------------------------------
DejaVu's Profile: http://www.excelforum.com/member.php...o&userid=22629
View this thread: http://www.excelforum.com/showthread...hreadid=524842


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
Call a batch file from an Excel Macro Alex Horan Excel Discussion (Misc queries) 0 March 2nd 06 03:29 PM
Call a batch file from an Excel Macro Gary''s Student Excel Discussion (Misc queries) 0 March 2nd 06 03:26 PM
how can i call macro in powerpoint file from excel file pm[_2_] Excel Programming 3 January 6th 06 10:40 PM
Macro to call a file that has a auto open macro in the file itself [email protected] Excel Programming 1 August 5th 05 06:39 AM
Call a macro in anothe file William Benson Excel Programming 5 June 8th 05 03:36 AM


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