Close Menu
    Facebook X (Twitter) Instagram
    Trending
    • Satchel Pelts List for Red Dead Redemption 2
    • Create a Video Wall With FFmpeg
    • Mitsubishi Outlander Towbar Electrics
    • Mitsubishi Outlander Towbar Installation
    • Telephone Block List
    • Hard Drive Repair After Wrong Voltage Mishap
    • How To Send Excel Workbook As Email Using Button
    • Compare EV Chargers
    YouTube Instagram Facebook RSS
    Technology Spy
    • Tutorials & Help
    • Reviews
    Technology Spy
    You are at:Home»Excel»How To Send Excel Workbook As Email Using Button

    How To Send Excel Workbook As Email Using Button

    0
    By Matt on March 22, 2022 Excel, General, Microsoft Office

    There are a number of techniques for sending an Excel Workbook to someone via email. In this post I’ll show how to send the file via email using a Button and some basic VBA script. This allows the user to enter information into the sheet and click a button to send it to a recipient.

    Here is a function called EmailFile. It sends the whole Worksheet to the recipient whose address is defined by the “strRecipients” variable. You will need to update this variable and insert the email address you want to send to.

    Sub EmailFile()
    strSubject = "Feedback Form"
    strRecipients = "firstname.surname@example.com"
    ActiveWorkbook.SendMail Recipients:=strRecipients, _
    Subject:=strSubject
    End Sub
    

    Here is slightly more advanced version of the function. It uses an array to define a list of recipients so you can send to multiple people.

    Sub EmailFile()
    
    Dim strSubject As String
    Dim strRecipients As Variant
    
    strSubject = "Feedback Form"
    strRecipients = Array("a.b@example.com", "x.y@example.com")
    
    ActiveWorkbook.SendMail Recipients:=strRecipients, _
                            Subject:=strSubject
    
    End Sub
    

    Hopefully you’ll find this technique for sending excel workbooks via a button useful.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleCompare EV Chargers
    Next Article Hard Drive Repair After Wrong Voltage Mishap

    Related Posts

    Hard Drive Repair After Wrong Voltage Mishap

    Compare EV Chargers

    64GB Class 10 SD Card Scam on eBay

    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    109

    Recent Posts
    March 24, 2025

    Satchel Pelts List for Red Dead Redemption 2

    January 29, 2025

    Create a Video Wall With FFmpeg

    May 24, 2024

    Mitsubishi Outlander Towbar Electrics

    Categories
    • 3D Printing
    • Android
    • Arduino
    • Development
    • ESP8266
    • Excel
    • Gaming
    • General
    • GIMP
    • Home Automation
    • JavaScript
    • Linux
    • Microsoft Office
    • Mobile Devices
    • Oracle APEX
    • Python
    • Raspberry Pi
    • Reviews
    • Security
    • SharePoint
    • Tutorials & Help
    • VBScript
    Web Tools

    A set of quick and basic online tools for web designers and software developers :

    • Hash Generator
    • Text to HTML List
    • Text to HTML Table
    • URL Encoder and Decoder
    • UNIX Timestamp Calculator
    • LED Resistor Calculator
    • Extract Email from Text
    • Mortgage Calculator
    Tags
    Android APEX Apple Arduino Black Friday Coolermaster csv Elite Dangerous email ESP-01 ESP8266 EV Excel file handling Format gaming GIMP Gritin Home Assistant Home Automation Linux lists Media os.stat os.walk Outlander Power Python Qi RDR2 Review scam Security SharePoint 2010 string Syncwire text text files TrueCrypt Ubuntu USB-C VBA VBscript Windows 10 Xbox One
    About

    Welcome to Technology Spy, a site devoted to gadgets, computers, programming and all things technology! You’ll also find product reviews for items I own as well as tutorials, guides and scripts for the software I use.

    Archives
    Other Resources
    • MattsBits
    • Raspberry Pi Spy
    YouTube Facebook Instagram Pinterest RSS

    Entries RSS | Comments RSS

    Copyright © 2025 - All Rights Reserved - Matt Hawkins

    mastodon.social@MattHawkins

    Type above and press Enter to search. Press Esc to cancel.