Application.Run "MyWorkBook.xls!Macro1"
will work (run the macro called Macro1
in the MyWorkBook.xls
file).
Application.Run "My Work Book.xls!Macro1"
will not work (if the workbook name contains spaces, Excel says "the macro cannot be found").
I just spent hours figuring out that it's the spaces causing this problem...
Is there a way around this without renaming the file?