I have used the following code to open and close an excel file after working in it, but after the file is closed I checked the task manager it shows EXCEL.EXE * 32 in the process tab. Is there a way to remove this from task manager also when I close my excel workbook ?
; Open the already existing Excel File #include <Excel.au3> $oExcel = ObjCreate("Excel.Application") Local $sFilePath1 = @ScriptDir & "\Excel File.xlsm" ;This file should already exist Local $oExcel = _ExcelBookOpen($sFilePath1) ;Opening the file $oExcel.application.quit ;Closing the Excel Application
I created a Launcher script for work, which checks a network drive for the newest version of a Microsoft Access front end file, updates the user's copy if they have an older version, and then launches the newest version. However, each time it's run, new tasks keep showing up in the Task Manager that don't get closed. I've tracked down the problem to the ShellExecute function.
ShellExecute("U:\My Documents\Access DB\Test.accdb") I created a script with a single line of code (above) and ran it 10 times. 2 out of 10 times (2nd run and 10th run), the script opened the Test.accdb file and stopped running, as intended. The other 8 times, the Test.accdb file was opened, but the script kept running indefinitely. It just fails to stop running, and doesn't appear to be doing anything. I can add extra lines of code after Shellexecute, like ConsoleWrite("Am I still running?") and it will run that code, but the script will still fail to exit afterwards..
Does anyone know what the problem is, or how I can avoid it?