Solved

OpenProcess()

Posted on 1997-11-10
1
1,252 Views
Last Modified: 2008-09-30
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".

My Question....
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
0
Comment
Question by:msaccess
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
ozphil earned 100 total points
ID: 1959204
OpenProcess() is not a VB library routine.

To adapt it to your needs i need you to paste the entire code here. Ill then modify it for you.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question