Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

OpenProcess()

Posted on 1997-11-10
1
Medium Priority
?
1,292 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
1 Comment
 
LVL 4

Accepted Solution

by:
ozphil earned 200 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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Suggested Courses

886 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