Try this
On Error Resume Next
ActiveWorkbook.SendMail ", "), _
messnamer
If Err.Number 0 Then
'your code
End If
On Error GoTo 0
--
Regards Ron de Bruin
http://www.rondebruin.nl
"John Baker" wrote in message ...
Hi:
I am setting up to E-mail something from excel through Outlook.
The code of interest is:
(messname is the name of the message)
ActiveWorkbook.SendMail ", "), _
messname
The problem is that Outlook pops up a warning message that someone is trying to e-mail,
and asks for approval. If the user approves, thats fine but if they click NO the system
goes off into never never land.
I want to be able to detect that they have clicked no and take specific action to close
some files and tidy things up. My question is how do I do that?
Advice appreciated
John Baker