TripScott Posted March 30, 2010 Share Posted March 30, 2010 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. expandcollapse popup#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" WinMinimizeAll() LoadMacros() Func LoadMacros() $oWkbook = "I:\Engineering\Admin\Timecards\EPPIResourceExport.xls" $oExcel = ObjGet("", "Excel.Application") If ProcessExists("excel.exe") Then $oExcel.Workbooks.Open($oWkbook) Else $oExcel = _ExcelBookOpen($oWkbook) EndIf ProcessWait("excel.exe") $oExcel.VBE.ActiveVBProject.VBComponents.Import($sFrm) $oExcel.VBE.ActiveVBProject.VBComponents.Import($sBAS1) $oExcel.VBE.ActiveVBProject.VBComponents.Import($sBAS2) $oExcel.VBE.ActiveVBProject.VBComponents.Import($sBAS3) $oExcel.VBE.ActiveVBProject.VBComponents.Import($sBAS4) $oExcel.run($sMacroName) ;run the macro EndFunc I want AutoIt to end here, not when the Excel macro is done running. Thanks, Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now