How To Insert the path where the Workbook is saved to the title bar using VBA?
Tags: toinsertthepathwhere, vbamacros
Published: 2021-09-28 11:40:02

---
title: How To Insert the path where the Workbook is saved to the title bar using VBA?
published: true
date: 2021-09-24 09:11:34 UTC
tags: ToInsertThePathWhere,VBAMacros
canonical_url: https://geekexcel.com/how-to-insert-the-path-where-the-workbook-is-saved-to-the-title-bar-using-vba/
---

In this blog post, we are going to see how to  **insert the path where the workbook is saved to the title bar**  **or the status bar** using VBA in Microsoft Excel. Let’s get into this article!! 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)**

## To add a title to the Title bar

- 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://geekexcel.com/wp-content/uploads/2021/09/Select-Visual-Basic-9-1024x180.png)<figcaption>Select Visual Basic</figcaption>

- Now, in the **VBAProject pane** , you have to **double-click ThisWorkbook**.
- After that, at the **top of the module** , you need to **open the left drop down list** and **select Workbook** , and then **select the Activate** event from the event **drop down list on the right**.

![](https://geekexcel.com/wp-content/uploads/2021/09/Click-the-module-name-1024x119.png)<figcaption>Set the module name</figcaption>

- In the **Activate event** , you have to type the following **code** given below.

```
Application.Caption = "Macro File"
```

![](https://geekexcel.com/wp-content/uploads/2021/09/Use-the-Code.png)<figcaption>Use the Code</figcaption>

- Now, the above code will **assign a Macro File** as title to the **workbook**.

![](https://geekexcel.com/wp-content/uploads/2021/09/Assign-Macro-File.png)<figcaption>Assign Macro File</figcaption>

- After that, to **cancel the displaying title** while activating or opening a different workbook, you need to **add the Deactivate event** by selecting Deactivate from the Procedure drop down list.
- In the **Deactivate event** , you have to type the following **code** as given below.

```
Application.Caption=" "
```

![](https://geekexcel.com/wp-content/uploads/2021/09/Use-Deactive-event.png)<figcaption>Use Deactivate event</figcaption>

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

![](https://geekexcel.com/wp-content/uploads/2021/09/Save-the-Code-78.png)<figcaption>Save the Code</figcaption>

- Finally, you will get the **output** as changed title in **Excel** as shown above.

## Wind-Up

We hope that this short tutorial gives you guidelines on how to  **insert the path where the workbook is saved to the title bar**  **or the status bar** 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/) **!!**

**Sum-Up:**

- **[Count the Times a Word Appears in a Cell or a Range in Excel Office 365!!](https://geekexcel.com/count-the-times-a-word-appears-in-a-cell-or-a-range-in-excel-office-365/)**
- **[Excel Formulas to Count specific word in a range ~ Easy Tutorial!!](https://geekexcel.com/excel-formulas-to-count-specific-words-in-a-range/)**
- **[Excel Formulas to Get the Last Word of a Text String ~ Quick Method!!](https://geekexcel.com/excel-formulas-to-get-the-last-word-of-the-text-string/)**
- **[Remove the Last Word ~ Easy Tutorial!!](https://geekexcel.com/excel-formulas-to-remove-the-last-word-easy-tutorial/)**
- **[Excel Formulas to Extract the Word that Contains Specific Text ~ Easily!!](https://geekexcel.com/excel-formulas-to-extract-the-word-that-contains-specific-text/)**