Application.DDETerminateAll method (Access)

Use the DDETerminateAll statement to close all open dynamic data exchange (DDE) channels.

Syntax

expression.DDETerminateAll

expression A variable that represents an Application object.

Return value

Nothing

Remarks

For example, suppose you've opened two DDE channels between Microsoft Excel and Microsoft Access, one to retrieve system information about Excel and one to transfer data. Use the DDETerminateAll statement to close both channels simultaneously.

Using the DDETerminateAll statement is equivalent to executing a DDETerminate statement for each open channel number. Like the DDETerminate statement, the DDETerminateAll statement has no effect on active DDE link expressions in fields on forms or reports.

If there are no DDE channels open, the DDETerminateAll statement runs without causing a run-time error.

Tip

  • If you interrupt a procedure that performs DDE, you may inadvertently leave channels open. To avoid exhausting system resources, use the DDETerminateAll statement in your code or from the Immediate (lower) pane of the Debug window while debugging code that performs DDE.
  • If you need to manipulate another application's objects from Access, you may want to consider using Automation.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.