Closes the specified dynamic data exchange (DDE) conversation.
This statement is supported only for backward compatibility. Use the Component Object Model (COM) instead.
Note: Does not apply to SpeedScript programming.
Syntax
DDE TERMINATE ddeid[ NO-ERROR ]
ddeid
An integer expression that equals the channel number of an open conversation. It is the value returned by the DDE INITIATE statement that opened the conversation.
NO-ERROR
By default, if the statement fails to close the conversation, the AVM raises the ERROR condition, and posts the error to the DDE frame DDE-ERROR attribute. If you specify NO-ERROR, the AVM does not raise the ERROR condition but does post the error to the DDE frame.
Example
The following fragment shows a typical use of the DDE TERMINATE statement. It assumes that the Microsoft Excel application is running, and has created the default Excel worksheet, Sheet1. It then uses the DDE INITIATE statement to open a conversation with Sheet1 as the topic, returning the channel number of the conversation to the variable, Sheet1. After exchanging data with the worksheet, the example closes the conversation with Sheet1 using the DDE TERMINATE statement.
DEFINE VARIABLE Sheet1 AS INTEGER NO-UNDO. /* DDE-ID to worksheet topic */
DEFINE VARIABLE DDEframe AS HANDLE NO-UNDO. /* DDE frame handle */