Option Explicit
Implements IVBSAXErrorHandler
Private Sub IVBSAXErrorHandler_error(ByVal oLocator As MSXML2.IVBSAXLocator, _
strErrorMessage As String, ByVal nErrorCode As Long)
WriteErrorToDebugWindow "Error- validation error", strErrorMessage, _
nErrorCode, oLocator.lineNumber, oLocator.columnNumber
End Sub
Private Sub IVBSAXErrorHandler_fatalError(ByVal oLocator As MSXML2.IVBSAXLocator, _
strErrorMessage As String, ByVal nErrorCode As Long)
WriteErrorToDebugWindow "Fatal error or parsing error", strErrorMessage, _
nErrorCode, oLocator.lineNumber, oLocator.columnNumber
End Sub
Private Sub IVBSAXErrorHandler_ignorableWarning(ByVal oLocator As MSXML2.IVBSAXLocator, _
strErrorMessage As String, ByVal nErrorCode As Long)
End Sub
Private Sub WriteErrorToDebugWindow(strLabel As String, _
strDescription As String, ByVal ErrCode As Long, _
Line As Long, Column As Long)
Debug.Print strLabel + ": (" + CStr(ErrCode) + ") " + _
strDescription & "at " + "line " + _
Str(Line) + ", column " + _
Str(Column) + vbCrLf
End Sub
This code in the