Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Testing for active applications

Status
Not open for further replies.

gb433054

Aerospace
Joined
Jul 24, 2003
Messages
28
Location
GB
Can anyone tell me how to test if an application such as Outlook is open

thanks in advance
 
Use GetObject, which will return an error if your program is not running. Test for the error.

[tt]
On Error Resume Next
Set myapp = GetObject(, "Outlook.Application")
If Err.Number <> 0 Then
' Outlook not running
Else
' Outlook is running already
End If
Err.Clear
On Error GoTo 0[/tt]

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top