To find out the status of any particular application available or running in Microsoft Excel, take a look at this article. We will use VBA code to check to return “True”, if the application is available or running or return and “False” if not.
Question: I would like to have a macro to identify in background whether the specific application is running or available/installed in the system.
To identify the Outlook application is running or available; we need to follow the below steps to launch VB editor:
Function ApplicationIsRunning(ApplicationClassName As String) As Boolean ' returns True if the application is running ' example: If Not ApplicationIsRunning("Outlook.Application") Then Exit Sub Dim AnyApp As Object On Error Resume Next Set AnyApp = GetObject(, ApplicationClassName) ApplicationIsRunning = Not AnyApp Is Nothing Set AnyApp = Nothing On Error GoTo 0 End Function
Function ApplicationIsAvailable(ApplicationClassName As String) As Boolean ' returns True if the application is available ' example: If Not ApplicationIsAvailable("Outlook.Application") Then Exit Sub Dim AnyApp As Object On Error Resume Next Set AnyApp = CreateObject(ApplicationClassName) ApplicationIsAvailable = Not AnyApp Is Nothing Set AnyApp = Nothing On Error GoTo 0 End Function
Conclusion: This way we can check the status of specific application is install & whether it’s running or not.
We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write us at firstname.lastname@example.org
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.