View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

You could create a .VBS file that looked like:

dim myXL
On Error Resume Next
Set myXL = GetObject(, "Excel.Application")
If Err.Number = 429 Then
msgbox "Excel is not running"
else
myxl.quit
end If
On Error GoTo 0
Set myxl = nothing

But if you have a workbook that's been changed and not saved, excel will wait
for you to answer the "do you want to save your changes prompt".

And if excel isn't the active application, the excel icon on the taskbar will
blink to get your attention.

======
If you just want to kill excel, you can read a few suggestions in this thread:
http://groups.google.co.uk/group/mic...bc463e2166e781

(one line in your browser)

or
http://snipurl.com/h4wg



Randy Wayne wrote:

I am looking for a command line "switch" to exit Excel and/or a batch file
that can be run at a certain time that would look for an open instance of
Excel and close it.

--
Thanks,

Randy


--

Dave Peterson