Table of contents
Collapse the table of content
Expand the table of content

Application.DDEExecute Method (Access)

office 365 dev account|Last Updated: 4/3/2018
3 Contributors

You can use the DDEExecute statement to send a command from a client application to a server application over an open dynamic data exchange (DDE) channel.


expression. DDEExecute( ** ChanNum, ** Command )

expression A variable that represents an Application object.


NameRequired/OptionalData TypeDescription
ChanNumRequiredVariantA channel number, the long integer returned by the DDEInitiate function.
CommandRequiredStringa command recognized by the server application. Check the server application's documentation for a list of these commands.


For example, suppose you've opened a DDE channel in Microsoft Access to transfer text data from a Microsoft Excel spreadsheet into a Microsoft Access database. Use the DDEExecute statement to send the New command to Microsoft Excel to specify that you wish to open a new spreadsheet. In this example, Microsoft Access acts as the client application, and Microsoft Excel acts as the server application.

The value of the command argument depends on the application and topic specified when the channel indicated by the channum argument is opened. An error occurs if the channum argument isn't an integer corresponding to an open channel or if the other application can't carry out the specified command.

From Visual Basic, you can use the DDEExecute statement only to send commands to another application. For information on sending commands to Microsoft Access from another application, seeUse Microsoft Access as a DDE Server.

If you need to manipulate another application's objects from Microsoft Access, you may want to consider using Automation.

See also


Application Object

© 2018 Microsoft