How to call a macro in a different file

  • Thread starter Thread starter DejaVu
  • Start date Start date
D

DejaVu

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
 
In the past I have created a custom toolbar and linked the macros from
another workbook to it, to perform actions
 
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
 
assuming FileB.xls is open

application.Run "FileB.xls!MacroB"

see help on the Run command for details.
 
Back
Top