+ Reply to Thread
Results 1 to 6 of 6

Sending an email via UserForm

  1. #1
    Forum Contributor
    Join Date
    08-14-2016
    Location
    Warrington, England
    MS-Off Ver
    MS 365
    Posts
    168

    Sending an email via UserForm

    Hi all,

    I am trying to put A UserForm into my spreadsheet which when clicking the command button will bring up a UserForm with 1 text box to input information and two buttons "send email" and "cancel".

    The cancel button is pretty self explanatory but the send email button should always connect to Outlook and send the contents of the textbox to a specific email address.

    if it could display a message box once the email has been sent saying thanks that would also be great!

    Unfortunately I'm having trouble getting it to work and this is my first attempt at UserForms. sadly I am struggling

    Many thanks in advance!
    Last edited by Catsonheat; 02-19-2017 at 04:51 PM.

  2. #2
    Forum Contributor
    Join Date
    08-14-2016
    Location
    Warrington, England
    MS-Off Ver
    MS 365
    Posts
    168

    Re: Sending an email via UserForm

    After much tweaking I have finally managed to get it working so I will be closing this down as solved.

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Sending an email via UserForm

    Try this...it is bits and pieces of code that I use to send an email from a userform from within excel. The reason it is bits and pieces is because I believe this is the code you will need, the full code has a lot of extra stuff in it to pull data from excel and email it.
    Please Login or Register  to view this content.
    NOTE* This is UNTESTED as it does not contain all the code I use
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  4. #4
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Sending an email via UserForm

    Well shoot!

  5. #5
    Forum Contributor
    Join Date
    08-14-2016
    Location
    Warrington, England
    MS-Off Ver
    MS 365
    Posts
    168

    Re: Sending an email via UserForm

    Haha sorry Gmr! Many thanks for your reply though, it's still good to see and really helpful for me to see how your code is compared to mine and where mine could be improved!

    I have added some rep for you

  6. #6
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Sending an email via UserForm

    You may not want to change yours because I didn't test mine so "in theory" (in my mind) it should work as written, but it may not.
    Thank you very much for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Sending Email from a form button using text fields to build the email
    By jdoerr1021 in forum Access Tables & Databases
    Replies: 5
    Last Post: 06-05-2016, 10:22 PM
  2. Replies: 0
    Last Post: 11-24-2015, 03:29 AM
  3. [SOLVED] Sending an email to the name someone enters in a userform
    By tinytwo in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 11-09-2015, 01:36 PM
  4. Sending Email from VBA - selecting correct email address issue
    By Rachieo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-27-2014, 03:51 PM
  5. [SOLVED] sending email with specific range as email body vba modification
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2014, 11:24 AM
  6. [SOLVED] sending outlook email from userform
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-04-2013, 01:56 AM
  7. VBA Excel Userform Sending Email
    By Ironman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2009, 04:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1