Question How to trap error 5890 when exporting in excel

#1
Hi everyone!
Is there any solution to trap the "error 5890" when exporting excel or there is any solution or code that will tell if the cell in excel is selected.
Because when i exporting the COM-Handle is having an error when the excel Cell is selected or in edit mode.
Can anyone encountered this problem?
 

Cecil

17+ years progress programming and still learning.
#5
I don't know if this is going to work but you might be able to try this:

Code:
/** NOTE: 'BLOCK-LEVEL ON ERROR UNDO, THROW.' MUST BE THE FIRST STATMENT IN YOUR CODE,
    UNLESS YOU ARE USING A 'USING' STATMENT. **/
BLOCK-LEVEL ON ERROR UNDO, THROW.

DEFINE VARIABLE iErrorEntry AS INTEGER     NO-UNDO.
DEFINE VARIABLE cErrorMessages AS CHARACTER   NO-UNDO.


DO ON ERROR UNDO, THROW:

    /** YOUR EXCEL CODE GOES HERE! **/

END.


/** Try and catch any Progress system errors. **/
CATCH eSysError Progress.Lang.SysError:

    DO iErrorEntry = 1 TO eSysError:NumMessages:
    
        ASSIGN
            cErrorMessages = SUBSTITUTE("&1 &2~n",
                                        eSysError:GetMessage(iErrorEntry),
    END.
    
    cErrorMessages = TRIM(cErrorMessages, "~n").
    
    MESSAGE
        cErrorMessages
        VIEW-AS ALERT-BOX WARNING TITLE "Trapped a Progress Sys Error"
    
END CATCH.
 
Top