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

C

Cookie Monster

As an attachment, how do I e-mail an individual worksheet/tab within a
workbook with e-mailing the entire workbook?
 
C

Chip Pearson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top