+ Reply to Thread
Results 1 to 14 of 14

Macro, Auto, Email, Date

  1. #1
    Registered User
    Join Date
    02-12-2018
    Location
    FOUNTAIN, COLORADO
    MS-Off Ver
    OFFICE 365
    Posts
    8

    Macro, Auto, Email, Date

    Using Excel Office 365. This is the Module. I'm sure it is something very simple but it is driving me crazy. It sends the email perfectly when I hit "run" from Developer, Macros. I need it to run when the Workbook opens. This code is in a module for "Sheet 16". The dates are in the two columns. Thanks for your help.

    Please Login or Register  to view this content.
    Last edited by MARILYNMING; 02-13-2018 at 03:17 PM.

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

    Re: Macro, Auto, Email, Date

    Removed, OP complied with request
    Last edited by gmr4evr1; 02-13-2018 at 03:30 PM.
    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

  3. #3
    Registered User
    Join Date
    02-12-2018
    Location
    FOUNTAIN, COLORADO
    MS-Off Ver
    OFFICE 365
    Posts
    8

    Re: Macro, Auto, Email, Date

    I tried to do what you asked but I cannot figure out how to post it and it took out my edit.

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

    Re: Macro, Auto, Email, Date

    Looks like you got it.
    Give the following code a try, it goes in the ThisWorkbook module
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-12-2018
    Location
    FOUNTAIN, COLORADO
    MS-Off Ver
    OFFICE 365
    Posts
    8

    Re: Macro, Auto, Email, Date

    I don't understand. That opens a new workbook. I have inserted tomorrows date to see what happens. I have my Excel, (the shortcut to the workbook that I'm working in) open on boot up every day. It is the only program (app) that I have start. I will have to wait until tomorrow to see if it works smoothly. I will reply to you when I see what happens. Thank you

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

    Re: Macro, Auto, Email, Date

    Opens a new workbook? All I did was place the code you provided in the ThisWorkbook module and changed the name to Private Sub Workbook_Open()
    What this does it that anytime the workbook is opened, the code will run. Is that not what you wanted?

  7. #7
    Registered User
    Join Date
    02-12-2018
    Location
    FOUNTAIN, COLORADO
    MS-Off Ver
    OFFICE 365
    Posts
    8

    Re: Macro, Auto, Email, Date

    I think I know what might have happened. With all the struggle, I think the Macros got stuck. I have opened a new, clean Excel and have copied the worksheets, (not moved) so that there are no Macros. Now I have to finish setting them up and then will try the Macro. I'm going to assume that the one Macro will work on all the worksheets as long as my dates are in those specific columns and I can ad columns as I need to. Would love your input if you have time.

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

    Re: Macro, Auto, Email, Date

    When you put my code in the workbook module, did you delete the previous code?

  9. #9
    Registered User
    Join Date
    02-12-2018
    Location
    FOUNTAIN, COLORADO
    MS-Off Ver
    OFFICE 365
    Posts
    8

    Re: Macro, Auto, Email, Date

    UPDATE: I did not receive notice that you had replied. I think what happened was: Office ran an update, JAVA ran an update, OUTLOOK did not run the emails I sent to my second account, etc. Messed up the computer BIG time. A comedy of errors. What I have done is created a new workbook, manually copied the worksheets, entered the code into the workbook. It did not work and spent a lot of time yesterday to no avail. Got up this a.m. and a bunch of emails had arrived with all the test runs from day before and yesterday. I appears to be working but I'm going to run one more test. I am going to make a copy of the workbook because I want it to run all the worksheets that have TODAY's date in any column to send me an alert. If you would like, I will let you know how that turns out. Thank you so much for all of your help and I am sorry that your code did not work because of my computer. You have a GREAT!! day.

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

    Re: Macro, Auto, Email, Date

    No worries, and yes, please let us know how it goes.

  11. #11
    Registered User
    Join Date
    02-12-2018
    Location
    FOUNTAIN, COLORADO
    MS-Off Ver
    OFFICE 365
    Posts
    8

    Re: Macro, Auto, Email, Date

    Still having lots of trouble. I try to close the entire Excel app. but I find the Excel session is still running in Windows Task Manager. I am going to create a new workbook, send it to my son and then delete what I have on my desktop. I'm sure there are better ways but feeling like a mushroom right now. I'm still trying to code an array for the entire workbook to check each sheet for certain columns for today's DATE. You will remember that I had it for two columns but have been unable to figure out how to add more. I hope I am not bothering you with all my 'chatting'.

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

    Re: Macro, Auto, Email, Date

    No worries about the "chatting".
    Can you attach a desensitized version of the workbook you are using with any code you have in it?

  13. #13
    Registered User
    Join Date
    02-12-2018
    Location
    FOUNTAIN, COLORADO
    MS-Off Ver
    OFFICE 365
    Posts
    8

    Re: Macro, Auto, Email, Date

    What I have done: I have created a new workbook with one spreadsheet that I have copied from the original (nothing sensitive)and hopefully have attached correctly. What I want: I would like to insert a VBA module for each WORKSHEET to auto email for DATE from COLUMNS. I have found that creating a module for the WORKBOOK won't work for me since each worksheet has a different message (SUBJECT, BODY) and different COLUMNS). You would do me a huge favor if you would give me the VBA and then variable for one, two, three columns in the code and I will be able to choose which columns I want from each worksheet. Thank you so much for your help! You must be a wonderful person to take time out from your day to help other people and I really appreciate it!
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    02-12-2018
    Location
    FOUNTAIN, COLORADO
    MS-Off Ver
    OFFICE 365
    Posts
    8

    Re: Macro, Auto, Email, Date

    I have updated the code for the workbook. I am still having trouble adding additional columns to the code. As you can see, I need to be able to have the code check more columns for DATE. Thanks, again, for all your time and effort.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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