View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gee Gee is offline
external usenet poster
 
Posts: 32
Default Sending 3 email?

This works!!
I've been working on it forever and finally figured it out, with all of your
help, of course.
The only problem NOW is that it sends 3 emails to the address instead of
just one. I tried changing it to "OnRefresh", "BeforeUpdate", "AfterUpdate",
"OnChange" ect.

What am I missing?

Private Sub Worksheet_Calculate()
If Range("HK2").Value = "YES" Then

Set aOutlook = GetObject(, "Outlook.Application")
Set aEmail = aOutlook.CreateItem(0)
aEmail.Importance = 2
aEmail.Subject = "NOC AGING CALL NUMBER"
aEmail.Body = Range("A2")
aEmail.Recipients.Add "
aEmail.Send

End If

End Sub