View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chris Nicholas Chris Nicholas is offline
external usenet poster
 
Posts: 4
Default can i send an email or warning from excel


"Laura" wrote in message
om...
Hi
I need to either send an email or have a warning pop up when I open
the workbook when a cell gets to a certain date. Any help would be
greatly appreciated. Thank you.

Laura


You can have the cell date checked in the Workbook_Open event and present a
message box:

In ThisWorkbook Under Workbook_Open place the following code. Replacing the
appropriate cell for A1 and the date that you expect to produce the
Notification.

If DateValue(Range("A1").Value) = DateValue("7/10/2003") Then
MsgBox "The Date has been reached.", vbCritical, "Date Check"
End If

You can also have it send a copy of the Workbook to someone:

ActiveWorkbook.SendMail ActiveWorkbook.SendMail
", Subject:="Date Reached"

But note that if you are using Outlook as your e-mail or Outlook Express the
application will prompt you stating that an application is attempting to
send something on your behalf. Then ask if it is to be allowed.

This is actually documented in Article 263107 XL2000: SendMail Method
Prompts After You Apply Outlook E-mail Security located at
http://support.microsoft.com/?id=263107

Chris