Friday, October 25, 2013

Kill all running excel instances using VBScript


vbScript is very useful to handle Excel applications.
Following code should be placed in .VBS file.

SET WinShell = CreateObject("WScript.Shell")
SET oExcelKill=WinShell.Exec("taskkill /F /IM Excel.EXE")
SET oExcelKill= Nothing
SET WinShell =Nothing

Above code will kill all currently running excel applications without asking any confirmation messages.