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

Loop

 

Exit Sub

 

trap:

    'we're in the clear

    

End Sub

 

Kim Scaccia, System Admin

Recovery Reimbursement

Patient Business & Financial Services

Halifax Medical Center

386-226-4590 opt 1 ext 2018

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lawrence,
Mitchell
Sent: Tuesday, March 25, 2008 11:27 AM
To: [email protected]
Subject: [Talk] Method to see if an application is running

 

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

*: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 

 

Send a "thank you
<http://intranet.christushealth.org/spiritBuck/Default.asp> " to
someone!

 

<<image002.jpg>>

Reply via email to