How To Mail Sheet using Array VBA in Microsoft Excel?
Tags: tomailsheet, vbamacros
Published: 2021-09-30 05:38:33

---
title: How To Mail Sheet using Array VBA in Microsoft Excel?
published: true
date: 2021-09-28 10:19:19 UTC
tags: ToMailSheet,VBAMacros
canonical_url: https://geekexcel.com/how-to-mail-sheet-using-array-vba-in-microsoft-excel/
---

In this article, you will learn how to **mail sheets using array VBA** in Microsoft Excel. Let’s see them below!! Get the 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  **copy and paste the code**  given below.

```
Sub Mail_SheetsArray()
    Dim strDate As String
    Sheets(Array("Sheet1", "Sheet3")).Copy
    strDate = Format(Date, "dd-mm-yy") & " " & Format(Time, "h-mm-ss")
    ActiveWorkbook.SaveAs "Part of " & ThisWorkbook.Name _
                        & " " & strDate & ".xls"
    ActiveWorkbook.SendMail "ron@debruin.nl", _
                            "This is the Subject line"
    ActiveWorkbook.ChangeFileAccess xlReadOnly
    Kill ActiveWorkbook.FullName
    ActiveWorkbook.Close False
End Sub

```

- 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-88.png)<figcaption>Save the Code</figcaption>

- Again, you have 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-57.png)<figcaption>Run the Code</figcaption>

- Finally, you can  **mail sheets using array** in Microsoft Excel.

## A Short Summary

We hope that this short tutorial gives you guidelines on how to **mail sheets using array 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/) **!!**

**Read Next:**

- **[Excel Formulas to Convert the String into Array ~ Quick Tricks!!](https://geekexcel.com/excel-formulas-to-convert-the-string-into-array/)**
- **[How to Create an Array of Numbers in Excel Office 365?](https://geekexcel.com/how-to-create-an-array-of-numbers-in-excel-office-365/)**
- **[Mail the Activeworkbook using VBA in Microsoft Excel](https://geekexcel.com/how-to-mail-the-activeworkbook-using-vba-in-microsoft-excel/)**
- **[How to Extract Email Address from Text using excel VBA?](https://geekexcel.com/how-to-extract-email-address-from-text-using-excel-vba/)**
- **[How to Send Bulk Emails From Excel VBA in One Click in Excel Office 365?](https://geekexcel.com/how-to-send-bulk-emails-from-excel-vba-in-one-click-in-excel-office-365/)**