+ Reply to Thread
Results 1 to 20 of 20

Not recieving email fro VBA code

  1. #1
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Not recieving email fro VBA code

    Hi

    I'm having problems with a code to send email from VBA, it opens up ok on my outlook and then I click on send and all seems ok, but I never reactive the email back and no one els gets the email. can anyone help

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Not recieving email fro VBA code

    Hello donkey_uk,

    As a rule, you should never add code statements that turn off error handling or displaying alerts until your code is fully debugged.

    Try this version of you code and see if there are any error messages or alerts that popup.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Not recieving email fro VBA code

    Hi

    Thank you, I have tried your code any nothing pops up, no errors, it send the email but I get nothing back

  4. #4
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Not recieving email fro VBA code

    it seems to be stuck on sending the email

  5. #5
    Registered User
    Join Date
    07-31-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2007, 2013
    Posts
    2

    Re: Not recieving email fro VBA code

    Try replacing .Display with .send

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Not recieving email fro VBA code

    Hi


    nope Im still having the same problem, outlook seems to be stuck on the sendin mail bit, doing my head in now lol.

    Is there any other code I can use ?

  7. #7
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Not recieving email fro VBA code

    try this one
    Please Login or Register  to view this content.
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  8. #8
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Not recieving email fro VBA code

    Quote Originally Posted by Naveed Raza View Post
    try this one
    Please Login or Register  to view this content.



    Nope same proble.

    Just been tols the person im sending to uses AOL will this make a diffrence to the code ?

    As i have no problems sending it to hi and i use Lotus Notes..

    If there is what code should i use for AOL

    Thank you

  9. #9
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Not recieving email fro VBA code

    Sorry for confusion as I was told he was using Outlook. So need code for AOL.
    Thank you

  10. #10
    Registered User
    Join Date
    07-31-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2007, 2013
    Posts
    2

    Re: Not recieving email fro VBA code

    Ok, try looking on Ron De Bruin, he has a lot of god tips for excel.

  11. #11
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Not recieving email fro VBA code

    Hi,

    Replace your complete code with below one

    Note: Run Mail_Call macro only

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Not recieving email fro VBA code

    Quote Originally Posted by Naveed Raza View Post
    Hi,

    Replace your complete code with below one

    Note: Run Mail_Call macro only

    Please Login or Register  to view this content.

    Thank you this worked.

    Could i ask one thing thou.

    On the msg box that pops up saying Yes or No. can you change this to say " Send to United " & " Send to EGE" could you put a cancle button there too plase.

    Thank you

  13. #13
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,640

    Re: Not recieving email fro VBA code

    Pehaps this link might help

    There is also code available at http://www.rondebruin.nl/win/section1.htm

  14. #14
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Not recieving email fro VBA code

    Quote Originally Posted by Naveed Raza View Post
    Hi,

    Replace your complete code with below one

    Note: Run Mail_Call macro only

    Please Login or Register  to view this content.


    This code all worked , but 1 small problem when I click on send mail it opens up outlook ans sends the mail but outlook closes and email not sent.

    I have to reopen outlook so it sends the email. is there anyway that outlook will remain open until the email has sent or just keep it open ?

    Thank you
    Last edited by donkey_uk; 10-25-2014 at 03:08 PM.

  15. #15
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Not recieving email fro VBA code

    Anyone ? Almost ther now just this one little snag

  16. #16
    Registered User
    Join Date
    06-25-2014
    Location
    Budapest, Hungary
    MS-Off Ver
    2007
    Posts
    40

    Re: Not recieving email fro VBA code

    If your mails are getting stuck in the outbox then u only need to be sure the outlook application is open before u run the code.
    I had similar issue and adding

    Please Login or Register  to view this content.
    before the outmail line fixed the problem.
    Should look like this:

    Please Login or Register  to view this content.

  17. #17
    Forum Contributor
    Join Date
    05-13-2013
    Location
    Swindon UK
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Not recieving email fro VBA code

    Quote Originally Posted by D0se View Post
    If your mails are getting stuck in the outbox then u only need to be sure the outlook application is open before u run the code.
    I had similar issue and adding

    Please Login or Register  to view this content.
    before the outmail line fixed the problem.
    Should look like this:

    Please Login or Register  to view this content.
    Hey thanx bud it worked, I so love you lol.

    Thanx again

  18. #18
    Registered User
    Join Date
    06-25-2014
    Location
    Budapest, Hungary
    MS-Off Ver
    2007
    Posts
    40

    Re: Not recieving email fro VBA code

    yw, just mark as solved if you can please

  19. #19
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,060

    Re: Not recieving email fro VBA code

    Hi,
    I used yr code with the outlook closed, the code opens it, I hit "send" and I rcvd it, hope you rcvd it too, I used yr email adddrtresses.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  20. #20
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,640

    Re: Not recieving email fro VBA code

    Have you compared with Ron's code?

+ 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 code to send email to the people whose email address is in the Access table
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-30-2014, 05:11 AM
  2. Excel code to email whats in the spreadsheet in the body of email
    By Kain93 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-18-2012, 09:55 AM
  3. [SOLVED] ISSUE - Not recieving email notifications
    By Simon Lloyd in forum Suggestions for Improvement
    Replies: 20
    Last Post: 03-15-2012, 03:58 PM
  4. c# recieving button event
    By Scott in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-30-2005, 05:30 AM
  5. [SOLVED] USING INDEX AND RECIEVING #VALUE ERROR MESSAGE
    By gordo in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 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