Close all Instances of Excel
This script will close all instances of Excel and will NOT save any changes
made to the active workbookof each session: type the code in a file with
extension VBS, locate it in Explorer & double click.
CloseExcel
SUB CloseExcel()
on error resume next
set xl =getobject(,"Excel.Application")
xl.activeworkbook.saved = true
xl.Quit
set xl = nothing
call CloseExcel
End Sub
"Tod" wrote:
I guess this is more of a vbscript question, but what
would be the best code to close all open instances of
Excel?
|