+ Reply to Thread
Results 1 to 13 of 13

Auto update VBA on opening. send to Outlook

  1. #1
    Registered User
    Join Date
    06-12-2020
    Location
    Baku
    MS-Off Ver
    2016
    Posts
    7

    Lightbulb Auto update VBA on opening. send to Outlook

    Good day to everybody.
    new user here.

    i am sharing file here, since for some reason i cannot attach it
    docs.google.com/spreadsheets/d/1OVY6q8PU2hl27alBVxeDcDKyVfxE1hfb/edit?usp=sharing&ouid=103656479342250674299&rtpof=true&sd=true
    Please Login or Register  to view this content.

    I am trying to make this code run so every time I open it so excel automatically checks for expired equipment, put message about it and then send it to Outlook.
    Ideally i want all outdated equipment to be listed in email too.

    i tried to copy the code to Workbook section and insert it here but it is working.
    Please Login or Register  to view this content.
    is there any way around it?
    p.s. I know it is bad code, it could be improved, but currently I am limited to my knowledge.
    Last edited by elvin_a; 05-31-2023 at 07:14 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: Auto update VBA on opening. send to Outlook

    try

    put all inside the workbook module

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-12-2020
    Location
    Baku
    MS-Off Ver
    2016
    Posts
    7

    Re: Auto update VBA on opening. send to Outlook

    thank you sir. unfortunately Outlook window does not show up at all.

    to make clear i want days counts to be checked(E column), and then names(A column) shown in Outlook
    Last edited by elvin_a; 06-01-2023 at 12:57 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: Auto update VBA on opening. send to Outlook

    update the range
    i only used up to row 10 so as not to show possibility of so many outlook windows

    modify also the worksheet name accordingly

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-12-2020
    Location
    Baku
    MS-Off Ver
    2016
    Posts
    7

    Re: Auto update VBA on opening. send to Outlook

    Quote Originally Posted by k1dr0ck View Post
    update the range
    i only used up to row 10 so as not to show possibility of so many outlook windows

    modify also the worksheet name accordingly

    Please Login or Register  to view this content.
    thanks, but i do not think it is related to range. increasing till E20 did not do anything. Not working.
    is it possible to show all outdated equipment in outlook, not in separate emails?

  6. #6
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: Auto update VBA on opening. send to Outlook

    your range is up to 10,000 rows
    do you want to include all the equipment name which are overdue in the subject in one email?

  7. #7
    Registered User
    Join Date
    06-12-2020
    Location
    Baku
    MS-Off Ver
    2016
    Posts
    7

    Re: Auto update VBA on opening. send to Outlook

    Quote Originally Posted by k1dr0ck View Post
    your range is up to 10,000 rows
    do you want to include all the equipment name which are overdue in the subject in one email?
    i put range just in case. i will reduce it to hundreds later when working with real numbers of our equipment.

    Yes, correct, include all overdue equipment in email body and preferably place message box in excel, stating generally that there is expired equipment detected
    Last edited by elvin_a; 06-02-2023 at 02:08 AM.

  8. #8
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: Auto update VBA on opening. send to Outlook

    try

    Please Login or Register  to view this content.
    Last edited by k1dr0ck; 06-03-2023 at 03:42 AM.

  9. #9
    Registered User
    Join Date
    06-12-2020
    Location
    Baku
    MS-Off Ver
    2016
    Posts
    7

    Re: Auto update VBA on opening. send to Outlook

    thanks.

    not working) changed range and ws name
    should i add code related to Outlook?

  10. #10
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: Auto update VBA on opening. send to Outlook

    see attached file
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    06-12-2020
    Location
    Baku
    MS-Off Ver
    2016
    Posts
    7

    Re: Auto update VBA on opening. send to Outlook

    Quote Originally Posted by k1dr0ck View Post
    see attached file
    you are living legend

    thank you kind sir for your time & patience.
    If you ever come to Baku(Azerbaijan) beer, tea or whatever you prefer on me

  12. #12
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: Auto update VBA on opening. send to Outlook

    if that solves your problem, you may mark this thread as solved using `thread tools` just above post #1

  13. #13
    Registered User
    Join Date
    06-12-2020
    Location
    Baku
    MS-Off Ver
    2016
    Posts
    7

    Re: Auto update VBA on opening. send to Outlook

    Quote Originally Posted by k1dr0ck View Post
    if that solves your problem, you may mark this thread as solved using `thread tools` just above post #1
    Done. Thank you

+ 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 auto outlook 2016 to send e-mail based off criteria
    By broman5000 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-30-2017, 04:15 PM
  2. Paste the data from closed sheet and send an auto email from outlook
    By Kiran Kurapati in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2015, 12:52 AM
  3. [SOLVED] VBA to auto update when opening a workbook
    By namluke in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-27-2014, 04:28 PM
  4. how can I get Outlook VBA to auto send an email out each Friday at 2PM?
    By Marijke in forum Outlook Formatting & Functions
    Replies: 5
    Last Post: 08-21-2013, 04:58 AM
  5. how to auto send multiple emails from outlook 2007
    By Jagdish Sharma in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 07-15-2013, 04:15 AM
  6. Cannot auto send email after Generating in Outlook
    By sajeel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2011, 12:57 PM
  7. Turn off auto update on opening
    By tuph in forum Excel General
    Replies: 1
    Last Post: 02-01-2007, 06:30 PM

Tags for this Thread

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