Application Process-Shell Command

  • Thread starter Thread starter GarethG
  • Start date Start date
G

GarethG

I use the shell command to launch an access project file.
I need to detect when this process(Access) has terminated (a macro
within the access project file terminates itself once it has finished
what it is doing).

The reason for ths is that I want the Access Project to run and do its
thing;
Excel code waits until the process has finished;
Excel (using VBA) refreshes pivot table.

Can anyone help me on this or is it beyond the scope of VBA ?
 
GarethG said:
I use the shell command to launch an access project file.
I need to detect when this process(Access) has terminated (a macro
within the access project file terminates itself once it has finished
what it is doing).

The reason for ths is that I want the Access Project to run and do its
thing;
Excel code waits until the process has finished;
Excel (using VBA) refreshes pivot table.

Can anyone help me on this or is it beyond the scope of VBA ?

Far from it but you would be better off using automation via
VBA instead of the shell command

http://www.microsoft.com/OfficeDev/Resources/Auto97.htm
http://support.microsoft.com/default.aspx?kbid=260410

Keith
 
Does Access Close?

If so, you could use the FindWindow API to look for it, and if not found,
then you know it is done

If Access doesn't close, then you should probably use automation to manage
access

If Access closes:

http://support.microsoft.com/?id=214248
XL2000: How to Force Macro Code to Wait for Outside Procedure

http://support.microsoft.com/?id=129796
HOWTO: 32-Bit App Can Determine When a Shelled Process Ends

http://support.microsoft.com/?id=147392
XL: How to Force Macro Code to Wait for Outside Procedure
 
Back
Top