Scheduled Task to Close Application

M

M Thran

Hi,
I have a scheduled task to open excel, a macro runs on_open to update my web
query, but then require one to close excel when the update is finished. Does
anyone have any suggestions?
 
T

Twayne

M Thran said:
Hi,
I have a scheduled task to open excel, a macro runs on_open to update
my web query, but then require one to close excel when the update is
finished. Does anyone have any suggestions?

Do you mean to close the application after it's opened and been run?
Tskill and Taskkill are the first things that come to mind. To learn
more about them, go to a Command Prompt and enter
tskill /?
and/or
taskkill /?
for the list of switches available with each.
..
Here's an example of one of my uses in a batch file:

@echo off
TSKILL /A
taskkill /IM firefox.exe
taskkill /IM IEXPLORE
taskkill /IM notepro.exe
taskkill /IM PDExplo.exe
:end

Set it up for your own apps and switches and you should be fine.
Then have task scheduler run the batch for you after the apps have run.

HTH,

Twayne`
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Scheduled task 4
No Current Record Error, Scheduled Task 4
Scheduled task problem 22
Scheduled Tasks 2
schedule a task 1
Unknown task scheduled starting 2/1/08 6
Task Scheduler 1
Excel Unlink open excel files 2

Top