How to use Message Box to Update Today’s Day in Microsoft Excel VBA?
Tags: tousemessageboxtoupd, vbamacros
Published: 2021-09-23 09:53:51

---
title: How to use Message Box to Update Today’s Day in Microsoft Excel VBA?
published: true
date: 2021-09-21 11:15:09 UTC
tags: ToUseMessageBoxToUpd,VBAMacros
canonical_url: https://geekexcel.com/how-to-use-message-box-to-update-todays-day-in-microsoft-excel-vba/
---

In this post, we will explain to you how to  **use the message box to update today’s day** in Microsoft Excel VBA. Let’s see 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://geekexcel.com/wp-content/uploads/2021/09/Select-Visual-Basic-9-1024x180.png)<figcaption>Select Visual Basic</figcaption>

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

![Insert a module](https://geekexcel.com/wp-content/uploads/2021/09/Insert-a-module.png)<figcaption>Insert a module</figcaption>

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

```
Sub TodaysDay()
 Select Case DatePart("w", Date, vbMonday)
    Case 1
        MsgBox "Mon"
    Case 2
        MsgBox "Tue"
    Case 3
        MsgBox "Wed"
    Case 4
        MsgBox "Thur"
    Case 5
        MsgBox "Fri"
    Case 6
        MsgBox "Sat"
    Case 7
        MsgBox "Sun"
    End Select
End Sub

```

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

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

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

![Choose Macro option](https://geekexcel.com/wp-content/uploads/2021/09/Choose-Macro-option-11-1024x184.png)<figcaption>Choose Macro option</figcaption>

- Now, you have to make sure that your  **macro name is selected**  and click the  **Run ** button.

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

- After that, you will get the **name of today’s date** as **output**.

![](https://geekexcel.com/wp-content/uploads/2021/09/Output-29.png)<figcaption>Today’s date Output</figcaption>

- If you want to **change the format from Fri to Friday** , you can change it in **code**.

```
Sub TodaysDay()
 Select Case DatePart("w", Date, vbMonday)
    Case 1
        MsgBox "Monday"
    Case 2
        MsgBox "Tuesday"
    Case 3
        MsgBox "Wednesday"
    Case 4
        MsgBox "Thursday"
    Case 5
        MsgBox "Friday"
    Case 6
        MsgBox "Saturday"
    Case 7
        MsgBox "Sunday"
    End Select
End Sub

```

- Finally, this time, you will get **output** as **full name of the day** after running **macro**.

![](https://geekexcel.com/wp-content/uploads/2021/09/Full-name-output.png)<figcaption>Full day Output</figcaption>

## Verdict

We hope that this tutorial gives you guidelines on how to  **use the message box to update today’s day** in Microsoft Excel VBA. 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/) **!!**

**Related Articles:**

- **[How to update data from one sheet to Another Sheet through VBA in Microsoft Excel?](https://geekexcel.com/how-to-update-data-from-one-sheet-to-another-sheet-through-vba-in-microsoft-excel/)**
- **[Merge Tables By Matching Column From Two Worksheets in Excel](https://geekexcel.com/how-to-update-merge-tables-by-matching-column-from-two-worksheets-workbooks-in-excel/)**
- **[How to Enter Today’s Date With Time in Excel? Using Shortcuts!!](https://geekexcel.com/enter-todays-date-with-time-excel/)**
- **[Enter the Date in Excel Sheet ~ Step-by-Step Procedure!!](https://geekexcel.com/enter-the-date-excel/)**
- **[How to Add an Input Message in Data Validation in Excel office 365?](https://geekexcel.com/how-to-add-an-input-message-in-data-validation-in-excel-office-365/)**