|
I have a similar question. It is my understanding that you can obtain the Process ID of anything you shell out. That is if I wanted to run a batch file and obtain the process id I could do.
Dim PID as Double
PID = Shell("C:\Batchfile.bat")
My question is now that you know the process id can you then check to see if it is still running. I want to wait until the batch file finishes to move on with my program. So I need to be able to determine if that PID is still active or not.
Thanks,
Davy >>> "Scaccia, Kimberly" <[EMAIL PROTECTED]> 3/25/2008 12:56 PM >>> Only works when Excel is active. I activate excel a lot to use functions and VB Code applied to my spreadsheets (ie put in formulas before Kim Scaccia, System Admin Recovery Reimbursement Patient Business & Financial Services 386-226-4590 opt 1 ext 2018 From: Does this work even when excel does not have an active window actually open (IE when excel is being used by BWS) Thank you, Mitch Lawrence Lead Applications Analyst Technical Support - NPR/Automation CHRISTUS Information Management
Send a "thank you" to someone! From: I have one that checks to see if Excel is running and if it is, close it: Works beautifully: Sub WaitForExcelToShutDown() Dim obj As Object On Error GoTo trap Do Set obj = GetObject(, "Excel.Application") 'this will fail if Excel Isnt running obj.quit Set obj = Nothing Wait 2 Exit Sub trap: 'we're in the clear End Sub Kim Scaccia, System Admin Recovery Reimbursement Patient Business & Financial Services 386-226-4590 opt 1 ext 2018 From: Good morning all. Happy spring! Does anyone have a method to check running processes to see if a particular application is running? I've got several scheduled scripts that utilize the same spreadsheet for input data. I would like to, when the script starts, check to see if excel.exe is already in the list of running processes and then take action dependent upon the results of that query. Action 1 if excel is already running, action 2 if it is not. Thank you, Mitch Lawrence Lead Applications Analyst Technical Support - NPR/Automation CHRISTUS Information Management
Send a "thank you" to someone! CONFIDENTIALITY NOTICE: This email message, including attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. |
- [Talk] Method to see if an application is running Lawrence, Mitchell
- RE: [Talk] Method to see if an application is runn... Thom C. Blackwell
- RE: [Talk] Method to see if an application is ... Lawrence, Mitchell
- RE: [Talk] Method to see if an application... Thom C. Blackwell
- RE: [Talk] Method to see if an application... TIMOTHY B. FRANCE
- RE: [Talk] Method to see if an application is runn... Scaccia, Kimberly
- RE: [Talk] Method to see if an application is ... Lawrence, Mitchell
- RE: [Talk] Method to see if an application... Scaccia, Kimberly
- RE: [Talk] Method to see if an applica... Davy Montgomery
- RE: [Talk] Method to see if an ap... Rich McNeil

