View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bruccce Bruccce is offline
external usenet poster
 
Posts: 20
Default REPOST: How to handle errors

I have tried this and it does not work... the reason is that the error
message is always changing!
in the last few minutes, I got 3 diff error numbers.

How can I test if the error numbers are different each time?

Thnaks
Bruce



"Bruccce" wrote in message
news:WbSXa.71532$uu5.7694@sccrnsc04...
I have a userform that I use.
I have it sending emails (works very well thanks to all of you in this
group).
The problem I have is that if I have a dialog box open (example, I have a
contact open, of msmessanger is asking me to log in) I get an error: The
error is
"Run-time error '-659537915 (d8b04005)':
A dialog box is open. Close it and try again.
[end] [debug] [help]
and then when I press any button, the form closes.

what I would like to happen, is if this error occurs, I would get a text

box
saying, "You have a dialog box open, please close it and then retry" and
then it would allow me to retry sending the email -after I close the
offending box-, or when I press a [retry] button, it would automatically

try
to resend. I would like this to happen without closing out the form.

How can I trap and process error messages?

Thanks
Bruce