WISDOMBYDATA
  • BLOG
    • Blog Guide
    • Blog History
  • EXCEL
    • Functions & Formulas
    • VBA & Macros
    • VLOOKUP
    • Pivot Tables
    • Conditional Formatting
    • Tricks & Shortcuts
  • BI
    • SAP BOBJ/BW
    • Tableau
  • SQL
  • ABOUT
    • About WBD
    • About Me

How to Email only one (of many) tabs/worksheets directly through MS Excel

9/25/2016

0 Comments

 

In this blog post I will illustrate an easy approach for emailing a desired tab of an Excel Spreadsheet without needing to log into Outlook and attaching an entire workbook to an email message.
​
Consider the MS Excel spreadsheet below containing three tabs (i.e. Sheet1, Sheet2, and Sheet3). The goal is to send out an email containing as an attachment only the active tab, i.e. Sheet1, to select recipients (without needing to delete sheet2 and sheet3 manually before sending it).
Picture
STEP 1] Go to the “Developer” on the ribbon and under the “Controls” section select the button symbol under “Form Control”. Note: If the Developer section is not visible on the ribbon of your MS Excel spreadsheet, click here for steps on how to activate it. 
Picture
STEP 2] The “Assign Macro” screen will appear after inserting a button in the workbook. Input a name the Button. I this case I’ve named it “Email_This Sheet”.
Picture

STEP 3] after entering the name of the button click on “New”. The VBA editor page appears. Insert the code within the attached Notepad document below in the code page.
full_macro.txt
File Size: 1 kb
File Type: txt
Download File

Picture
STEP 4] Save the page by clicking on the save symbol on the corner left hand side of the VBA editor screen. Ensure that that you are saving it as a “Macro-Enabled Workbook”. 
Picture
STEP 5] Click on the command button that has been created. The outlook page should appear with a MS Excel attachment containing ONLY the active tab (i.e. Sheet1) to your recipients. The attachment is now ready to be sent through Outlook.
Picture
​In order to ensure that the procedure has been performed correctly open the attachment from Outlook. As you could observe in the screenshot below, the opened attachment only contains the first tab (i.e. Sheet1) of the original Excel file and sheet2 and sheet3 have been suppressed in this attachment. 
Picture

Source for VBA Code: http://www.techonthenet.com/excel/macros/email_sheet2007.php
​
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Categories

    All
    BI
    EXCEL
    MISC
    SQL

    Archives

    June 2020
    May 2020
    April 2020
    March 2020
    February 2020
    December 2019
    November 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    May 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013

Powered by Create your own unique website with customizable templates.
  • BLOG
    • Blog Guide
    • Blog History
  • EXCEL
    • Functions & Formulas
    • VBA & Macros
    • VLOOKUP
    • Pivot Tables
    • Conditional Formatting
    • Tricks & Shortcuts
  • BI
    • SAP BOBJ/BW
    • Tableau
  • SQL
  • ABOUT
    • About WBD
    • About Me