View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default can i send an email or warning from excel

Just to add, this will send the email everytime the workbook is opened and
the criteria is met. That may be what you want, but if you only want it
sent on the first occurance, you would need to add some type of indicator
that the email has already been sent and check that indicator before
executing the code to send the email. Just a thought.


Regards,
Tom Ogilvy

"Ron de Bruin" wrote in message
...
Hi Laura

This in a module

Sub testmail()
Recipient = "
Subj = "Test"
Msg = "Hi there the date in cell ..........."
HLink = "mailto:" & Recipient & "?"
HLink = HLink & "subject=" & Subj & "&"
HLink = HLink & "body=" & Msg
ActiveWorkbook.FollowHyperlink (HLink)
Application.Wait (Now + TimeValue("0:00:03"))
SendKeys "%s", True
End Sub


And this in the Thisworkbook module

Private Sub Workbook_Open()
If Sheets("Sheet1").Range("B3") DateSerial(2003, 7, 5) Then
testmail
End If
End Sub

When you open the workbook it will check the date in b3 and if it is
DateSerial(2003, 7, 5) send the mail


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"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