» Mail one Sheet 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
Sheets("Sheet5").Copy
It doesn't have to be the active sheet used at that time. - Create a new workbook with the ActiveSheet.
- Save the workbook before mailing it.
- Delete the file from your hard disk after it is sent.
Sub Mail_ActiveSheet()
Dim strDate As String
ActiveSheet.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:
- Marketing Management
- Microsoft Windows XP Step by Step (With CD-ROM)
- Essentials of Accounting and Post Test Booklet 8, Eighth Edition
- 422 Tax Deductions for Businesses and Self-Employed Individuals : You Get a Raise Every Time You Find a Legitimate Tax Deduction
- The Financial Numbers Game: Detecting Creative Accounting Practices
- The Total Money Makeover. : A Proven Plan for Financial Fitness
No comments have been submitted.

