편집

다음을 통해 공유


Application.DDEPoke method (Access)

Use the DDEPoke statement to supply text data from a client application to a server application over an open dynamic data exchange (DDE) channel.

Syntax

expression.DDEPoke (ChanNum, Item, Data)

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
ChanNum Required Variant A channel number, an integer returned by the DDEInitiate function.
Item Required String The name of a data item recognized by the application specified by the DDEInitiate function. Check the application's documentation for a list of possible items.
Data Required String The data to be supplied to the other application.

Remarks

For example, if you have an open DDE channel between Microsoft Access and Microsoft Excel, you can use the DDEPoke statement to transfer text from an Access database to an Excel spreadsheet. In this example, Access acts as the client application, and Excel acts as the server application.

The value of the item argument depends on the application and topic specified when the channel indicated by the channum argument is opened. For example, the item argument may be a range of cells in an Excel spreadsheet.

The string contained in the data argument must be an alphanumeric text string. No other formats are supported. For example, the data argument could be a number to fill a cell in a specified range in an Excel worksheet.

If the channum argument isn't an integer corresponding to an open channel, or if the other application doesn't recognize or accept the specified data, a run-time error occurs.

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.