Thread: Question
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Question

Dee,

Set a reference to Outlook. Put this into the sheet's codemodule: assumes that cell B6 has the
date, a formula references cell B6, and B7 is empty or is not equal to "Contacted"

Private Sub Worksheet_Calculate()
If Range("B6").Value = Date And Range("B7").Value < "Contacted" Then
Call EmailMe
Range("B7").Value = "Contacted"
End If
End Sub

And put this into a regular codemodule:

Sub EmailMe()
Dim ol As Object, myItem As Object
Set ol = CreateObject("outlook.application")
Set myItem = ol.CreateItem(olMailItem)
myItem.To = "
myItem.Subject = "Check that workbook..."
myItem.Body = "Hello Dee, " & Chr(13) & Chr(13)
myItem.Body = myItem.Body & "Could you check that file for values? " & Chr(13) & Chr(13)
myItem.Body = myItem.Body & "Thanks for doing that." & Chr(13) & Chr(13) & Chr(13)
myItem.Body = myItem.Body & "Dee" & Chr(13)
myItem.Send
Set ol = Nothing
Set myItem = Nothing
End Sub


Note that depending on your version of Outlook, you may be prompted to allow the sending of the
email .... a pain, but....

HTH,
Bernie
MS Excel MVP


"Dee" wrote in message
...
I have a spreadsheet where I track certain events. I have a cell where a date
is recorded for a certain event. Is there a way to program excel so that when
the date in the cell becomes today's date, excel will send me an email to
alert me that I need to take action. If there is a way could you direct me to
a website where performing this action is explained. I am using Excel 2003.

Thanks in advance for your help.

Dee