Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Close MS Excel programmatically

I would like to close Excel from Lookout- programmatically. Does anyone have a method to do this. Is there any source code that I could execute using the run object? Active X? Lookout 4.5 and 5.0...

Regards,
Tommy Scharmann
0 Kudos
Message 1 of 3
(3,146 Views)
I'm not sure how relevent my information will be, but I have used Lookout to dump the data into a CSV file and ran EXCEL. Then EXCEL would use a macro, grab the data, then CLOSE itself. Hope this helps.
0 Kudos
Message 2 of 3
(3,146 Views)
.



Hello Tommy,

I like Ollie's method of having the Excel file close itself after it has done its work. However, if you have to close it from Lookout, here's another, less graceful, approach...

Use the Run object and the attached kill.exe (originally from Microsoft) with the following command:

kill /f excel.exe

Of course you'll have to get the syntax right for the Run object and provide the path to the Kill.exe. This just zaps Excel to death! You'll lose all unsaved data, etc. The switch "/f" is to force this, and is required.

As they say, "if brute force isn't working, you're not using enough of it!"

Hope this helps,

Khalid 🙂



.
0 Kudos
Message 3 of 3
(3,146 Views)