On Error Resume Next
Set rstResult=cnnDb.Execute(strSQL)
If cnnDb.Errors.Count=0 Then
' show the result
Else
' handle the error
End If
On Error Goto 0
-----------------------
On Error Resume Next
Set xmlDoc = CreateObject("MSXML.DOMDocument")
if Err.number<>0 then
MsgBox "failed to create MSXML,error:" & err.description
Set xmlDoc = nothing
On Error GoTo 0
else
MsgBox "success to create MSXML object"
end if