How To Determine if an application is available using VBA in Excel?
Tags: todetermineifanappli, vbamacros
Published: 2021-10-18 12:00:40

---
title: How To Determine if an application is available using VBA in Excel?
published: true
date: 2021-10-16 17:57:01 UTC
tags: ToDetermineIfAnAppli,VBAMacros
canonical_url: https://geekexcel.com/how-to-determine-if-an-application-is-available-using-vba-in-excel/
---

In this blog post, we will guide you on how to ** determine if an application is available using VBA** in Microsoft Excel. Let’s get them below!! Get an official version of MS Excel from the following link: **[https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)**

## Example

- Firstly, in the Excel Worksheet, you have to go to the  **Developer Tab.**
- Then, you need to ** ** select the  **Visual Basic**  option under the  **Code**  section.

![Select Visual Basic](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/09/Select-Visual-Basic-9-1024x180.png)<figcaption>Select Visual Basic</figcaption>

- Now, you have to click on **Insert** and select **Module**.

![Insert a module](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/09/Insert-a-module.png)<figcaption>Insert a module</figcaption>

- After that, you have to  **copy and paste the code**  given below.

```
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
```

- You need to  **save the code**  by selecting it and then  **close the window**.

![](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/10/Save-the-Code-16-1024x553.png)<figcaption>Save the Code</figcaption>

- Again, you have to go to the  **Excel Spreadsheet** , and click on the  **Developer Tab**.
- Then, you need to choose the  **Macros option**  in the Code section.

![Choose Macro option](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/09/Choose-Macro-option-11-1024x184.png)<figcaption>Choose Macro option</figcaption>

- Now, in any cell, you need to **enter formula** as follows to **check if Outlook Application is installed** on the pc.

```
=ApplicationIsAvailable("Outlook.Application")

```

![](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/10/Outlook-Application-is-installed.png)<figcaption>Check Outlook Application is installed</figcaption>

- After that, to determine if an **Outlook Application is currently running or not** , in any cell you have to **enter the formula** given below.

```
=ApplicationIsRunning("Outlook.Application")

```

![](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/10/Outlook-Application.png)<figcaption>Outlook Application is currently running or not</figcaption>

- Finally, you can see the status of a **specific application is installed** and whether it’s **running or not**.

![](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2021/10/Output-12.png)<figcaption>Output</figcaption>

## End of the Era

We hope that this tutorial gives you guidelines on how to  **determine if an application is available using VBA** in Microsoft Excel. Please leave a comment in case of any  **queries,**  and don’t forget to mention your valuable  **suggestions**  as well. Thank you so much for Visiting Our Site!! Continue learning on **[Geek Excel](https://geekexcel.com/)!! **Read more on [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!!**

**Keep Reading:**

- **[How to Create Application Level Events in Excel VBA?](https://geekexcel.com/how-to-create-application-level-events-in-excel-vba/)**
- **[What is CreateObject Method in VBA & How to use CreateObject Method in Excel?](https://geekexcel.com/what-is-createobject-method-in-vba-how-to-use-createobject-method-in-excel/)**
- **[Excel Formulas for Running Count of Occurrence in a List!!](https://geekexcel.com/excel-formulas-for-running-count-of-occurrence-in-a-list/)**
- **[Formulas to calculate the running total from a range in Excel!!](https://geekexcel.com/formulas-to-calculate-the-running-total-from-a-range-in-excel/)**
- **[Excel Formulas to Create the Running Count Group by N Size!!](https://geekexcel.com/excel-formulas-to-create-the-running-count-group-by-n-size/)**