Is there a way to check and see if another program is running?
I want to be able to see if Excel is running and if it is use the instance already open instead of making another.
Printable View
Is there a way to check and see if another program is running?
I want to be able to see if Excel is running and if it is use the instance already open instead of making another.
VB Code:
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Private Sub Command1_Click() Dim hExcel As Long hExcel = FindWindowEx(0, 0, "XLMAIN", vbNullString) If hExcel <> 0 Then MsgBox "Excel is running" End Sub
Okay ... this is all good, butwhat if the app you are looking for is one you have created ex: mls_interface.exe ... how would I check to see if this application is currently running? :confused: