Sending email automatically from excel

Tyler

New Member
Joined
Sep 19, 2006
Messages
5
Hello,

I am trying to build a truck dispatch system in excel that will automatically send an email to my clients when a cell becomes greater than the agreed wait time. I have an arrive and depart column that calculate my total wait time. for example if the arrive time is 07:00 and the depart time is 09:00 then the wait time cell equals 2 hours. When i have not manually input a time into the depart cell the wait time is calculated using another cell which holds the current time ex. now()
I need this to automatically send to my client when the time exeeds 1.5 hours.
I have seen some posts that allow this email to be sent based on column values for stocks but i cant fuigure out how to alter this to work for me?

Any help would be greatly appretiated. :biggrin:
 

Some videos you may like

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Doug.T

Board Regular
Joined
Sep 19, 2006
Messages
80
Stock market applications usually have updating information that triggers the email macro. If I understand correctly, in your case, you may not be using the spreadsheet but still want to trigger an email program when a time difference cell hits a certain number.
My suggestion is an "ontime" macro that runs and checks every x minutes - in the case below every 5 minutes. Use Calculate to update your time difference cells before the email macros


Sub test()
Calculate
'do stuff here/ check time/ send email macros
Application.OnTime Now + TimeValue("00:05:00"), "test"
End Sub

I hope this helps, Doug
 

Tyler

New Member
Joined
Sep 19, 2006
Messages
5
Thanks for the reply Doug. If i set this to check every 2 minutes how can i make sure it only sends one email when the time has passed the limit. I only need to send the email once not every time it checks the cell. Also is it possible to send two different emails for two different time limits. For example when the time reaches 1:15 it would send a warning email and when it reaches 1:30 it would send another email stating that billing has started.
 

Watch MrExcel Video

Forum statistics

Threads
1,113,956
Messages
5,545,177
Members
410,668
Latest member
Gaexel
Top