DDETerminate Method

Closes the specified dynamic data exchange (DDE) channel to another application.

Security  Dynamic data exchange (DDE) is an older technology that is not secure. If possible, use a more secure alternative to DDE, such as object linking and embedding (OLE).

expression**.DDETerminate(Channel)**

expression Optional. An expression that returns an Application object.

Channel    Required Long. The channel number returned by the DDEInitiate method.

Example

This example creates a new workbook in Microsoft Excel and then terminates the DDE conversation.

Dim lngChannel As Long

lngChannel = DDEInitiate(App:="Excel", Topic:="System")
DDEExecute Channel:=lngChannel, Command:="[New(1)]"
DDETerminate Channel:=lngChannel

Applies to | Application Object | Global Object

See Also | Communicating with Other Applications | DDETerminateAll Method