Ok I am trying to trap a problem with the following code
Public Sub doCDOmail()
on error goto errorhandler
With objcdo
.Configuration = objCDOConfig
.To = strTo
.CC = strCC
.BCC = strBCC
.From = FromAddress
.Subject = strSubject
.HTMLBody = strTxtBody
.AddAttachment (strAttachFile)
.Send
End With
exit sub
errorhandler:
Select Case Err.Number
Case -2147220975
msgbox "You've entered an incorrect parameter for your mail server", vbOKOnly, "Email Server Error"
Case else
msgbox "The following error occurred. Error Number: " & err.number & " Error Description: " & err.description & " Please correct this problem.", vbokonly, "Email Error!"
End Select
Exit Sub
End Sub
When the user enters in an incorrect password or username it gives a runtime error of "-2147220975" The error handler doesn't even work.... am I missing something here??
Public Sub doCDOmail()
on error goto errorhandler
With objcdo
.Configuration = objCDOConfig
.To = strTo
.CC = strCC
.BCC = strBCC
.From = FromAddress
.Subject = strSubject
.HTMLBody = strTxtBody
.AddAttachment (strAttachFile)
.Send
End With
exit sub
errorhandler:
Select Case Err.Number
Case -2147220975
msgbox "You've entered an incorrect parameter for your mail server", vbOKOnly, "Email Server Error"
Case else
msgbox "The following error occurred. Error Number: " & err.number & " Error Description: " & err.description & " Please correct this problem.", vbokonly, "Email Error!"
End Select
Exit Sub
End Sub
When the user enters in an incorrect password or username it gives a runtime error of "-2147220975" The error handler doesn't even work.... am I missing something here??