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

  • Thread starter Thread starter Kenji
  • Start date Start date
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
 
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"
 
Back
Top