Warning! Time has expired....

Y

yh73090

Help!!!
I've been given a spreadsheet and asked to come up with a way to hav
an alert sent via email when the difference between two dates expires
Well I found the code for sending an email, but it needs to b
triggered by clicking a button.
This is the code I have for this: (Continued request below Code)

Sub Email()
Dim oApp
Dim oMess
Dim eRange As Range
Dim i As Long

Application.ScreenUpdating = False
Set oApp = CreateObject("Outlook.Application")
Set eRange = Range("A1")
Do
Set oMess = oApp.CreateItem(0)
With oMess
.To = eRange.Offset(i, 0)
.Subject = "Your time has expired"
.Body = "Joe, Moe, and Larry" & vbNewLine & vbNewLine & _
"Please goto the Stooges spreadsheet and handle th
problem."
.send
End With
Set oMess = Nothing
i = i + 1
'stop on the first blank cell in column a or b etc
Loop While eRange.Offset(i, 0) > ""

Set oApp = Nothing
Application.ScreenUpdating = True
End Sub

My second question is how to create a expiration date, I am looking fo
the number of workdays between two dates.

Thank you so much for all your help.
Y
 
Top