vba - How to Launch an Excel macro from command line (Without Worksheet_Open Event)? -
is possible launch excel macro command line?
i don't want use worksheet_open event , open excel file.
i need launch specific macro exists in excel workbook.
use windows powershell, has excellent com interop support.
i have workbook c:\testbeep.xlsm macro called "test". transcript:
ps c:\> $app = new-object -comobject excel.application ps c:\> $wb = $app.workbooks.open("c:\testbeep.xlsm") ps c:\> $wb.name testbeep.xlsm ps c:\> $app.run("test") ps c:\> $app.quit() optionally can add in $app.visible = $true make window visible.
Comments
Post a Comment