Schedule Macro

  • Thread starter Thread starter Natalie
  • Start date Start date
N

Natalie

Hi,
I use the following script to schedule a macro
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"E:\apps\MasterData\Weekly\Reports\DepOps.mdb" /x WklyChanges. This runs the
macro just fine, but it opens the database and the script while it's being
executed. After it finishes both the database and the script is left
open...I have to manually close it at all time. How can I close both
database and script after it finishes execution?

Thanks for all your help!
Natalie
 
Natalie,

In answer to the second question, I think you need to put a Quit action
at the end of the WklyChanges macro.

As for the "script", I guess it depends where you are running this from.
Are you using Windows Task Manager, or a third party scheduling
utility, or a batch file?
 
Natalie,

I am not sure why the DOS window is opening to run the batch file. But
anyway, I think you don't need the batch file, as I think you can write
the Command Line directly into the task scheduler.
 
Hi Natalie / Steve or anyone else...

I have the exact same issue about closing an Access macro.

I'm running it from a .bat file.

I CAN get access to close from a second .bat file using tskill msaccess

HOWEVER, that does me no good when running from a script. I can put both .bat files in my script, but it never gets passed the first .bat because access can't close.

There must be some command ( / ???) after the macro parameter is specified.

Any help is greatly appreciated.
Doug
 
This ALMOST got me there. I am not sure what to put in the Run: text box . .
or does something go in the start In: box???
 
Back
Top