Posted on 1997-11-10
I want to execute an external applicationvia VBA's shell() command. I then want to send keystrokes to that application via VBA's Sendkeys() command. But before continuing past my Sendkeys() commands -- I want the external application to complete (initiated by the last sendkey() which exits the external application)......
after much painful research I have discovered a VB routine called OpenProcess() which seems to allow the user an option as to how to wait (dead wait via WaitForSingleObject() or active wait by testing with GetExitCodeProcess and doing DoEvents if external application still active). I found all this out in a very good book called "Hard Core Visual Basic".
From within my Windows 95 MS Access VBA routine, can I - and if I can - how exactly do I implement OpenProcess() with a flag to choose the active wait option? I really need to know all the details -- for example, what I need to declare and code in order for my VBA routine to have at VB routines and pre-defines such as OpenProcess(). Also, please indicate the syntax and usage of OpenProcess() and any other routines or defines that I need to use.
Thanks very much,
Desperately in search of how to make VBA's shell() synchronous