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`