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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 11:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com