Sending 3 email?
No, didn't work, didn't send any email.
I believe it's not working for me because mine doesn't actually have a
"change" made. If I manually type "YES" into the cell, it sends the email,
but the spreadsheet is refreshed every minute from a database. It is
unmonitored and sits and updates it's self. That is why I tried "Calculate",
it's an independent process that runs with the refresh.
Any other ideas?
I think we're on the right track...only 1 email sent!
"Gary Keramidas" wrote:
works here, you might have some other code somewhere doing something.
--
Gary Keramidas
Excel 2003
"Gee" wrote in message
...
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
|