POKE macro

Sends data to another application. Use POKE to send data to documents in other applications you are communicating with through dynamic data exchange (DDE).

Syntax

POKE(channel_num, item_text, data_ref)

Important   Microsoft Excel for the Macintosh requires system software version 7.0 or later for this function.

Channel_num    is the channel number returned by a previously run INITIATE function.

Item_text    is text that identifies the item you want to send data to in the application you are accessing through channel_num. The form of item_text depends on the application connected to channel_num.

Data_ref    is a reference to the workbook containing the data to send.

If POKE is not successful, it returns the following values.

Value returned Meaning
#VALUE! Channel_num is not a valid channel number.
#DIV/0! The application you are accessing does not respond after a certain length of time, and you press ESC to cancel.
#REF! POKE is refused.

Examples

In Microsoft Excel for Windows, the following macro inserts the text from cell C3 into the Microsoft Word for Windows document SALES.DOC at the start of the document.

=POKE(SendChanl, "StartOfDoc", C3)

In Microsoft Excel for the Macintosh, the following macro inserts the text from cell C3 into the Microsoft Word document named Report.

=POKE(SendChanl, "TopicName", C3)

Related Functions

INITIATE   Opens a channel to another application

REQUEST   Returns data from another application

TERMINATE   Closes a channel to another application

Return to index