Posts by RFDisturbance

    Re: A Macro That Will Send E-mail When Cell Is A Certain Value


    Ok, I pasted the exact code you supplied, and it didn't work. My e-mail addresses are in C13, and so I changed all E18 to C13, saved the file, and reopened. When I did this it asked if I wanted to Enable Macros, so I clicked enable. Then it went through some process where it stated that it was attempting to send an e-mail, and asked if it was okay. I said yes go ahead, and then it gave me: "Run-time error '-2147467259 (8004005)': There must be at least one name or distribution list in the To, Cc, or Bcc box." error. I am not sure what I did wrong, but obviously something ain't right. Please help.


    PS. Don't tell anyone that I am getting help from a Navy guy, cause these guys would never let it go. LOL!!

    Good morning!!


    I hope I am doing this right. It is my first time. I am currently deployed to Iraq, and my commander wants his Excel spreadsheet to do something special so here we are. I have no where else to go. We have a current listing which has a cell count down til an expiration date is met. He would like to have the system send an e-mail to the responsible commander of the unit when their cell reaches 60 days left, 30 days left, and then again when their account has officially expired. There are 58 sheets in the workbook with different units listed and different commanders, all with expirations dates differing from each other. All the countdown cells are in C18. I have no experience in macros, so please go easy on me. Also the cell C18 is a formula with conditional format. So let me break it down of exactly what he wants since noone has answered this question yet:


    1. I need a macro that will look through all 58 sheets at the C18 cell and see if the value is 60, 30, or 0.


    2. If it matches any of these values, then it needs to send a specific e-mail message through Outlook.


    3. The message will be sent to the individual responsible for that sheet in the workbook. Their name appears in the sheet.


    4. This e-mail should run automatically without any input from the user.


    5. This macro should run as soon as the "Account List.xls" is opened.


    6. This macro will only be run once per day.


    Thanks for all your help, and your support. GO ARMY!!