How do I call an excel macro from outside the workbook?

K

Kenji

I have an excel workbook that opens another excel workbook. I would like to
run a macro in the other workbook.. so far I have

public oexcel as new Excel.Application
oExcel.Workbooks.Open("newstuff.xls")

how can I run a macro within newstuff.xls?
Thanks!

Kenji
 
H

Harlan Grove

Kenji said:
I have an excel workbook that opens another excel workbook.
I would like to run a macro in the other workbook.. so far
I have

public oexcel as new Excel.Application
oExcel.Workbooks.Open("newstuff.xls")

how can I run a macro within newstuff.xls?

Application.Run "newstuff.xls!YourMacroNameHere"
 
Top