Framework EDI Reference. Methods and Properties
ediDocument. Cancel

Cancels the process of loading a document.

Syntax:

Returns:

Returns 1 if the operation is successful; otherwise the operation returns zero.

Example:

Dim oEdiDoc As Fredi.ediDocument
Dim oSegment As Fredi.ediDataSegment
...

On Error GoTo errmsg

oEdiDoc.LoadEdi sPath & sEdiFile

Set oSegment = oEdiDoc.FirstDataSegment
Do While Not oSegment Is Nothing

    MsgBox oSegment.UserRequirement
    Set oSegment = oSegment.Next
Loop

Exit Sub
errmsg:

    oEdiDoc.Cancel
    MsgBox "There was a problem with loading the EDI file"

End Sub