My program uses Dialog System to capture the conditions to make an Excel Worksheet. After finishing the first producto in Excel I start the Dialog again to see if the operator want to add other products, using the following COBOL instruction:
MOVE "R-FIN" TO DS-PROCEDURE
PERFORM CALL-DIALOG-SYSTEM.
The R-FIN procedure is defined in the GLOBAL DIALOG as follows:
R-FIN
SHOW-WINDOW DBOX-FIN
REFRESH-OBJECT DBOX-FIN
SET-FOCUS EF-SIGUE
Up to this moment it works perfectly, the Dialog Box “DBOX-FIN” is shown and the Entry Field apparently receives the focus and the content of the master field is displayed.
But the focus is only apparent, because, although the field is highlighted in blue, anything I type does not appear in the field. If I hit the push Button to continue I receive
Exception 65537 not trapped by the class oleexceptionmanager.
Description: "Server defined OLE exception"
(80010001): La llamada fue rechazada por el destinatario.
Hit T to terminate program. Hit any other key to continue.
If I click pervious to typing in the entry field, everything works good.
But if the operator starts immediately typing, the program aborts with the Exception message.
If I select my output to a printer, the same global dialog works perfectly.
Any idea what I must add to the program in order to make it run with Excel?