+ Reply to Thread
Results 1 to 5 of 5

send email VBA not working

  1. #1
    Forum Contributor
    Join Date
    04-04-2016
    Location
    dallas tx
    MS-Off Ver
    365 (15.0.5501.1000)
    Posts
    534

    send email VBA not working

    This worked once and then never again.
    When the workbook is opened, the macro auto runs and checks cells in column I for conditions. If condition is true, then an email should be generated and sent out, and the J cell in the row should be populated with the phrase "Email Sent". This should happen for every row that meets the condition.
    When I open the workbook the macros do run but it is only populating column J with "Email Sent" but not actually sending an email.
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: send email VBA not working

    I opened your file and my Outlook client sent five emails to Dean.McGhee as soon as the file opened. How do you know your emails are not being sent?

    When posting file with Workbook_Open code you should make sure the code is benign first. I had to send another email telling good old Dean to ignore the first five.

    dean.jpg
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    04-04-2016
    Location
    dallas tx
    MS-Off Ver
    365 (15.0.5501.1000)
    Posts
    534

    Re: send email VBA not working

    Wow, I'm stupid. For some reason my outlook was not opening either by the macro or by me opening it up. I had to reboot my machine to get it to open. When I did I was hit with 125 back logged emails that were not sent. Guess from who....LOl. Sorry and Thanks for the help.
    Last edited by chriswrcg; 06-10-2022 at 11:20 AM.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: send email VBA not working

    I should have known better, your post did say that code runs when you open the file.

    To troubleshoot this I would put a .Display in so you can see the email after it's composed but before it is sent, and a Stop to force it into debug mode so you can go line-by-line with F8 to see what's happening.

    Note that I removed the actual email address to post here.
    Please Login or Register  to view this content.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: send email VBA not working

    I posted as you were editing your own post. Glad you solved it. I am not sure what could have been going on--the code opens a new instance of Outlook. Something must have been really screwed up to require a reboot to fix it.

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking addreputationiconsmall.jpg below their name.

+ 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. VBA not working to send email of Active Sheet
    By BADebbie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2021, 11:46 AM
  2. Send table to Email VBA not working
    By jpringle1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-07-2018, 10:37 AM
  3. [SOLVED] VBA code to send Outlook email with HTML text no longer working
    By Twaddy006 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-04-2016, 01:53 PM
  4. [SOLVED] Send email from excel 2007 and Outlook 2003 not working
    By Megatronixs in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 09-29-2014, 01:57 AM
  5. Marco to send email via MAC (Outlook is working fine)
    By angela1979 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2013, 07:10 PM
  6. code to send an email from outlook on last working day of a month
    By Shanthuday in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2013, 11:23 AM
  7. [SOLVED] Help please with auto send email VBA, it was working but isn't now
    By nje in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2013, 11:03 AM

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