Jump to content
Sign in to follow this  

$oExcel.run($macro) & stop

Recommended Posts


I would like to know if there is a trick to using the run function? I would like my script to start the excel macro but NOT wait for any information back. It should end right there.

#include <Excel.au3>

Global $oExcel, $oWkbook, $title, $sFrm
Global $sXLS = "Microsoft Excel"
Global $sFrm = "I:\Engineering\Admin\Timecards\Scripts\frmDateDivision.frm"
Global $sBAS1 = "I:\Engineering\Admin\Timecards\Scripts\CreateChecklist.bas"
Global $sBAS2 = "I:\Engineering\Admin\Timecards\Scripts\RunForm.bas", $sMacroName = "Start"
Global $sBAS3 = "I:\Engineering\Admin\Timecards\Scripts\Buttons.bas"
Global $sBAS4 = "I:\Engineering\Admin\Timecards\Scripts\FDFImport.bas"



Func LoadMacros()

    $oWkbook = "I:\Engineering\Admin\Timecards\EPPIResourceExport.xls"

    $oExcel = ObjGet("", "Excel.Application")

    If ProcessExists("excel.exe") Then
        $oExcel = _ExcelBookOpen($oWkbook)


    $oExcel.run($sMacroName) ;run the macro


I want AutoIt to end here, not when the Excel macro is done running.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.