» 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:
- Millionaire Real Estate Mentor : The Secrets of Financial Freedom through Real Estate Investing
- H&R Block's Just Plain Smart(tm) Tax Planning Advisor: A year-round approach to lowering your taxes this year, next year and beyond
- Microsoft Access 2002 for Dummies
- Financial Reporting and Analysis (2nd Edition)
- Microsoft Access Version 2002 Step by Step
- Real Estate Loopholes: Secrets of Successful Real Estate Investing
No comments have been submitted.


