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.
If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook.
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 email@example.com
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.
Thanks for the post. I learned how to determine if a specific MSO App is running, but now I would like to determine if a specific third party program like "SAP" or "Primavera 6" or "AUTOCAD" etc is available to run.
Background: A list box will be generated based on the available programs on the users PC. The user will be able to pick from this list which programs (as well as webpages, files and or folders) they want opened when Excel starts... any help would be appreciated + thanks!