DDEPoke

Syntax

DDEPoke ChanNum, Item$, Data$

Remarks

Uses an open dynamic-data exchange (DDE) channel to send data to an application. When you start a DDE conversation using DDEInitiate(), you open
a channel to a specific topic recognized by the server application. In Microsoft Excel, for example, each open document is a separate topic. When you send information to a topic in the server application, you must specify the item in that topic you want to send information to. In Microsoft Excel, for example, cells are valid items and they are referred to using either the "R1C1" format or named references.

DDEPoke sends data as a text string; you cannot send text in any other format, nor can you send graphics.

Argument

Explanation

ChanNum

The channel number of the DDE conversation as returned by DDEInitiate(). If ChanNum doesn't correspond to an open channel, an error occurs.

Item$

An item within a DDE topic. If the server application doesn't recognize Item$, an error occurs.

Data$

The string containing the data to send to the server application.


Examples

This example sends the value of the variable Total$ to the second row and third column of the Sheet1 worksheet in Microsoft Excel. On the Macintosh, the application name used in the DDEInitiate() instruction should be MacID$("XCEL") rather than "Excel".


channel = DDEInitiate ("Excel", "Sheet1")
DDEPoke channel, "R2C3", Total$

The following example sends the string "Total: $1,434" to the cell named "QuarterTotal" in the Sheet1 worksheet. On the Macintosh, the application name used in the DDEInitiate() instruction should be MacID$("XCEL") rather than "Excel".


channel = DDEInitiate("Excel", "Sheet1")
DDEPoke channel, "QuarterTotal", "Total: $1,434"

See Also

DDEExecute, DDEInitiate(), DDERequest$(), DDETerminate, DDETerminateAll