» Mail Sheet Array using VBA in Microsoft Excel
VBA macro tip contributed by Ron de Bruin, Microsoft MVP - Excel
CATEGORY - Mail - Send and Receive in VBA
VERSION - All Microsoft Excel Versions
- Create a new workbook with the SheetsArray.
- Save the workbook before mailing it.
- Delete the file from your hard disk after it is sent.
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
Book Store:
Recommended Books:
- The Intelligent Investor: The Classic Bestseller on Value Investing
- The Interpretation of Financial Statements
- Marketing Plans
- The Basics of Finance: Financial Tools for Non Financial Managers
- Business Plans For Dummies®
- Successful Business Planning in 30 Days: A Step-By-Step Guide for Writing a Business Plan and Starting Your Own Business
No comments have been submitted.

