DDETerminate Method

Microsoft Word Visual Basic

DDETerminate Method

       

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

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