Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if application running?
Does Excel have any property similar to Tasks in Word (or object similar to
Task) that allows you to determine whether a particular app is running? I don't want to activate the window, just determine if the app is running. Thanks for any help! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test if application running?
Hi
Here is some vbscript code that should do what you want. I have found this code very handy. I found it on a web site somewhere and do not know the original author. strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colProcesses = objWMIService.ExecQuery( "select * from win32_process" ) isrunning = False For Each objProcess in colProcesses If objProcess.GetOwner ( User, Domain ) = 0 Then msgbox objprocess.caption If objProcess.caption = "MSIMN.EXE" then ' replace "msimn.exe" with the objprocess.caption you want to know about isrunning = true ' then comment out the msgbox line End If End If Next if isrunning = true then ' comment out the msgbox lines and do what you want here msgbox "Outlook Express is running" else msgbox "Outlook Express is not running" end if Just use what you need from it. HTH Ken |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Running a macro from windows application | Excel Discussion (Misc queries) | |||
Procedure to detect if an application is running | Excel Programming | |||
Procedure to detect a running application and to register it. | Excel Programming | |||
running an password protected application | Excel Programming | |||
Problem in running an application | Excel Programming |