e-mail individual worksheet/tab w/out e-mailing entire workbook?

  • Thread starter Thread starter Cookie Monster
  • Start date Start date
C

Cookie Monster

As an attachment, how do I e-mail an individual worksheet/tab within a
workbook with e-mailing the entire workbook?
 
A worksheet cannot exist outside of a workbook. Therefore, you need to
copy the worksheet to a new workbook and email that workbook. For
example,

ThisWorkbook.Worksheets("sheet1").Copy
' Newly created workbook is now ActiveWorkbook
ActiveWorkbook.SendMail "(e-mail address removed)", "One Worksheet"
ActiveWorkbook.Close savechanges:=False

The first line of code copies Sheet1, creating a new workbook
containing only Sheet1. After the copy is complete, that newly created
workbook is then the active workbook. The code sends that workbook via
email and then closes it without saving.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Fri, 13 Mar 2009 13:23:02 -0700, Cookie Monster <Cookie
 
Back
Top